PermGen Collection Issues
Martin Hare-Robertson
Martin.Hare-Robertson at metaswitch.com
Fri Apr 27 01:22:33 PDT 2012
>> I am hitting a "java.lang.OutOfMemoryError: PermGen space" in a situation
>> where I think a great deal of the perm gen is actually eligible for
>> collection.
>
>By default CMS does not collect classes; try with
>-XX:+CMSClassUnloadingEnabled.
Running with -XX:+CMSClassUnloadingEnabled improved the results as Tomcat survived 58 webapp reloads (compared to 30 without CMSClassUnloadingEnabled) before hitting the same endless (Permanent Generation Full/Last ditch collection) GC issues and throwing "OutOfMemoryError: PermGen space".
>> I am running Tomcat 6 using a 32 bit Hotspot JVM (1.6.0_07). I have had
>
>Those are fairly old too. Also note that just because your app code does
>not leak, many (badly written) libraries keep static state or hidden
>internal threads alive unless they are explicitly shut down/cleaned up.
The heap dumps which I have taken should reveal if any libraries are doing anything to keep old webapp classloaders alive. According to Eclipse MAT the only path to a GC root for the old classloaders is through weak references.
Is there anything else I could try to fix this? Is it possible that this is a JVM/GC bug?
More information about the hotspot-gc-use
mailing list