Thanks for the suggestions. Tomcat does release permgen memory with
appropriate jvm options and configuration settings (
clearReferencesStopTimerThreads, clearReferencesThreadLocals).
When I did heap analysis, the culprit always seems to
be TimeLimitedCollector thread. Because of this, considerable amount of
classes are not getting unloaded.
More description of problem (and how to fix it) can be found at:
http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java,
http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded

Has any body successfully unloaded classes from permgen till now?

rajesh


On Wed, Mar 2, 2011 at 1:39 PM, Markus Jelsma <markus.jel...@openindex.io>wrote:

> 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