Hi, 

I remember reading somewhere that undeploying an application in Tomcat won't 
release memory, thus repeating the cycle will indeed exhaust the permgen. You 
could enable garbage collection of the permgen.

HotSpot can do this for you but it depends on using CMS which you might not 
want to use at all if you're running a small server with little memory. Anyway 
here are the options for enabling it:

Modern JVM:
-XX:+CMSClassUnloadingEnabled

If you're running an older JVM try:
-XX:+CMSPermGenSweepingEnabled

I just wish i could find the documentation on this one but it seems to left the 
internet. This is taken from my Wiki so it seems i read it at least once and 
made a note. 

Please report the results

Cheers,

> Hello,
> We currently deploy and undeploy solr web application potentially hundred's
> of times during a typical day. when the solr is undeployed, its classes are
> not getting unloaded and eventually we are running into permgen error.
> There are couple of JIRA's related to this:
> https://issues.apache.org/jira/browse/LUCENE-2237,
> https://issues.apache.org/jira/browse/SOLR-1735. Even after applying these
> patches, the issue still remains.
> Does any body have any suggestions for this?
> 
> Our environment:
>  Apache Tomcat/6.0.29
>  Solr 1.4.1
> 
> Thanks,
> rajesh

Reply via email to