Search code examples
javamavenjettyelpermgen

Solving a PermGen issue on redeploy with Jetty 7


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:


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.