I've got a Grails application that does a fairly decent amount of domain object creation and destruction, and it seems to run out of PermGen space at a very, very rapid rate. I've done the usual tweaks (bumped PermGen to 256M, enabled class GC, etc.), but no dice.
Would anyone care to recommend some (and hopefully free or very low-cost) tools for troubleshooting this sort of memory consumption in Groovy and/or Java? Or some techniques that you use to troubleshoot JVM memory problems?
Edit: This is when the application is deployed inside Tomcat in production mode; I've not tried with other containers. Even so, it would be nice to have some resources for tracking down the problem.
Have you tried
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
?
Together with increasing the usual suspects (-Xmx
, -Xms
, -XX:PermSize
and -XX:MaxPermSize
) this resolved all the PermGen issues on our production Tomcat, which had occured pretty soon after deploying the app. Never seen another OOM-Exception after that. :-)
I personally like VisualVM. There are definitely more powerful tools around, but this one has got a nice usability-to-power ratio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With