Question

After a couple of days of debugging I have managed to have a medium-to-large web application redeploy successfully on Tomcat 6.0.32 without any PermGen leaks. I saw the PermGen drop after it filled, and the classloaders were garbage collected.

After much rejoicing I tried to make the application redeploy without leaks on our development environment, which is composed of Maven and the Jetty plugin.

Unfortunately I seem to have hit a server limitation, as illustrated by the below screenshot

Yourkit snapshot http://img811.imageshack.us/img811/7320/jettyclassloaderbeanelr.png

Jetty request threads have a strong reference to a BeanElResolver which in turns has a strong reference to multiple classes from my webapp.

I have found no reference on how to flush this information.

How can I remove this final PermGen leak from my application?


Update:

I've done the following to fix the problem, with no luck:

  • updated to the Latest version of the Jetty Plugin ( both 7.4.5 and 8.0.0.M3 )
  • used the CMS collector : -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled

Update 2:

Was it helpful?

Solution

This is a actual bug in the EL implementation which is worked around in the latest Jetty versions.

Version 7.5.0, once released, will contain the fix.

OTHER TIPS

Not a direct answer to your question, but you might consider using JRebel in dev. With JRebel, you mostly don't have to redeploy, thus avoiding both the permgen leaks and the wasted time of a redeploy. It's been working extremely well for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top