users@jersey.java.net

[Jersey] Re: PermGen Memory Leak in Tomcat

From: Petr Jurák <petr.jurak_at_gmail.com>
Date: Fri, 30 Sep 2011 19:29:44 +0200

First of all I'm not sure, just guessing. And thanks for tip.
In our case we use Tomcat 6. The problem was related to redeploy war
in this container wich lead to memory leak. I didn't spend such long
time to solve this. Basically something locks web.xml and remains in
memory.

Br, Petr



2011/9/30 Philippe Marschall <philippe.marschall_at_netcetera.ch>:
> 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
>
>