2

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...

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
Mohamed Hafez
  • 8,621
  • 7
  • 41
  • 49
  • No answer on this yet? – Gabriel C. Troia Dec 06 '13 at 02:01
  • unfortunately - this is a common issue in Java ... I would start checking whether the JVM I'm using supports unloading classes or alternatively use a GC setting that enables swiping http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do – kares Dec 18 '13 at 08:53

1 Answers1

0

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

kares
  • 7,076
  • 1
  • 28
  • 38