users@jersey.java.net

[Jersey] Re: PermGen Memory Leak in Tomcat

From: Philippe Marschall <philippe.marschall_at_netcetera.ch>
Date: Fri, 30 Sep 2011 13:27:36 +0200

On 09/29/2011 07:22 PM, Petr Jurák wrote:
> Hi,
>
> IMHO it's not an issue of Jersey but Tomcat. We had many problems like
> that (after few redeployments we need to restart Tomcat because of
> PermGenSpace) in production though we don't use Jersey in these
> production applications. We "solved" it with sheduled restarts in
> regular service breaks. :(
> Please try to search Tomcat forum for suggestion.

What makes you sure it's a Tomcat issue? Libraries not cleaning up
thread locals usually is a library issue, not a Tomcat issue.

You can try running the latest Tomcat with
ThreadLocalLeakPreventionListener [1].

 [1]
http://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#ThreadLocal_Leak_Prevention_Listener_%28org.apache.catalina.core.ThreadLocalLeakPreventionListener%29

Cheers
Philippe