Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
Java-SCA-1.4
-
None
-
Tomcat on Windows/Unix
Description
— On Wed, 7/15/09, Simon Laws <simonslaws@googlemail.com> wrote:
From: Simon Laws <simonslaws@googlemail.com>
Subject: Re: Restarting webapp leads to OutOfMemory: Permgen space
To: user@tuscany.apache.org, nithyanirmal@yahoo.com
Date: Wednesday, July 15, 2009, 3:26 AM
Hi Nithya
I just tried and see the same effect. It doesn't take long the get the
perm gen error and seems to be holding onto the whole runtime
structure between stop/start. I'll take a look to see if I can see
what's going on. In the mean time can you raise a JIRA [1] to track
the problem.
Thanks
Simon
[1] http://issues.apache.org/jira/browse/TUSCANY
— On Tue, 7/14/09, nithyanirmal@yahoo.com <nithyanirmal@yahoo.com> wrote:
From: nithyanirmal@yahoo.com <nithyanirmal@yahoo.com>
Subject: Restarting webapp leads to OutOfMemory: Permgen space
To: user@tuscany.apache.org
Date: Tuesday, July 14, 2009, 11:07 PM
Hi all,
We have developed a web application using Tuscany 1.4 which is deployed in Tomcat. We have a need to restart the webapp on demand without stopping tomcat. Tomcat goes out of perm gen space and crashes after a few restarts. Looking through the memory dumps shows the roots to tuscany core MessageImpl class.
To narrow down the issue, I used the calculator-ws-webapp sample that came with Tuscany. After deploying the war in tomcat, I used tomcat manager to restart the webapp a few times. I can see that the "Perm Gen memory" keeps increasing in Jconsole. This happens even with Java options set to -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled.
However if all entries from the composite file are commented out, the perm gen memory is reclaimed when the webapp is stopped. Makes me think that when composite entries are present, Tuscany is holding on to the classes somehow preventing it from getting unloaded or garbage collected during webapp restart. Is that possible? Does Tuscany create its own classloader? Is there a call to release the classes loaded by Tuscany when the webapp is stopped?
hope someone can provide us pointers to fix this. This is currently blocking us from our release
Thanks,
N.V