Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • I've reported this as a bug on the Jetty issue tracker: maven-jetty-plugin: PermGen leak due to javax.el.BeanELResolver
like image 593
Robert Munteanu Avatar asked Jul 25 '11 14:07

Robert Munteanu


1 Answers

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.

like image 70
Robert Munteanu Avatar answered Nov 06 '22 22:11

Robert Munteanu