Leaking reference to jruby runtime, getting PermGen OOM errors after reloading app

215 views Asked by At

Something in my code, or in the gems I'm using is leaking a reference to the JRuby runtime: every time I reload an app on Torquebox, Trinidad, or anything else, the permgen just fills up until eventually after too many reloads I get a PermGen OOM Error.

How do I go about finding out what is causing this? What kind of things do I look for? I'm using JRuby 1.7.3 so it shouldn't be an issue with JRuby itself...

1

There are 1 answers

0
kares On

this is probably the closest you get with Hotspot making sure it clears PermGen memory :

JAVA_OPTS="-server -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseCodeCacheFlushing ..."

... of course won't help if there's a leaky reference holding back classes from being GC-d