You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by ni...@yahoo.com on 2009/07/15 08:07:48 UTC

Restarting webapp leads to OutOfMemory: Permgen space

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


      

Re: Restarting webapp leads to OutOfMemory: Permgen space

Posted by Simon Laws <si...@googlemail.com>.
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