Hunting and gathering in the JEE landscape

I am Frank, a freelance Java developer specialized in backend development from south western germany.

Frank Kieviet on identifying permgen leaks in Tomcat

posted by fas on 2010-04-22 . Tagged as programming, tomcat, java

Every web application developer who uses apache tomcat knows about the issue: redeploying an application often takes it's toll on Sun's Hotspot JVM's PermGen space, so that after a couple of redeploys tomcat cant load any new classes since the PermGen partition of the heap filled up.
Frank shows how one can identify the culprit using a heap dump created by jhat and then clicking through the references on a jmap instance until the offending class that still holds references to otherwise unused classes can be found. After removing those references to the "dead" classes the JVM is able to garbage collect in the PermGen space leaving the room needed to instantiate new classes.
So a big thank you goes out to Frank for showing how it's done.


Tags: programming, tomcat, java