You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Malcolm Warren <ma...@villeinitalia.com> on 2009/12/07 11:53:25 UTC
Tomcat, out of memory and hot reployment
Dear All,
I've seen that using hot deploy too often for apps on my production
server (more than seven or eight times) without restarting Tomcat causes
an Out of memory exception.
Whereas it doesn't happen on my mac test machine, presumably because it
has a different jvm from the debian linux production machine.
And I've read in several places the reason for this, for example:
"Hot redeployment always leads to an eventual JVM death as it runs out
of PermGen memory space that stores class definitions".
What I was wondering is:
If I turn off hot redeployment and use the Tomcat manager to redeploy
applications, does that solve the problem?
I would assume that it does not, but any information from the experts
would be very welcome.
Thanks,
Malcolm Warren
RE: Tomcat, out of memory and hot reployment
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Malcolm Warren [mailto:malcolm@villeinitalia.com]
> Subject: Tomcat, out of memory and hot reployment
>
> If I turn off hot redeployment and use the Tomcat manager to redeploy
> applications, does that solve the problem?
No, that is a hot redeployment.
> I would assume that it does not, but any information from the experts
> would be very welcome.
Fix your webapp (or libraries that it uses) so that it doesn't hang onto references to objects that it doesn't need. (Logging packages are infamous for causing this problem.) Make sure that any ThreadLocal usage is cleaned up at the end of *each* request. Watch out for anything in a shared library that keeps persistent references to webapp objects.
Use a profiler to find out where the unwanted references to superseded objects come from.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat, out of memory and hot reployment
Posted by Malcolm Warren <ma...@villeinitalia.com>.
Thanks very much for your answers.
My question has been clarified.
Malcolm
Pid ha scritto:
> On 07/12/2009 10:53, Malcolm Warren wrote:
>> Dear All,
>>
>> I've seen that using hot deploy too often for apps on my production
>> server (more than seven or eight times) without restarting Tomcat causes
>> an Out of memory exception.
>> Whereas it doesn't happen on my mac test machine, presumably because it
>> has a different jvm from the debian linux production machine.
>>
>> And I've read in several places the reason for this, for example:
>> "Hot redeployment always leads to an eventual JVM death as it runs out
>> of PermGen memory space that stores class definitions".
>
> Just to clarify, that is not an accurate statement.
>
> Replace "always leads" with "might lead (depending on what your app is
> doing)", then check the credibility of the source.
>
>
> p
>
>
>> What I was wondering is:
>> If I turn off hot redeployment and use the Tomcat manager to redeploy
>> applications, does that solve the problem?
>> I would assume that it does not, but any information from the experts
>> would be very welcome.
>>
>>
>> Thanks,
>> Malcolm Warren
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat, out of memory and hot reployment
Posted by Pid <pi...@pidster.com>.
On 07/12/2009 10:53, Malcolm Warren wrote:
> Dear All,
>
> I've seen that using hot deploy too often for apps on my production
> server (more than seven or eight times) without restarting Tomcat causes
> an Out of memory exception.
> Whereas it doesn't happen on my mac test machine, presumably because it
> has a different jvm from the debian linux production machine.
>
> And I've read in several places the reason for this, for example:
> "Hot redeployment always leads to an eventual JVM death as it runs out
> of PermGen memory space that stores class definitions".
Just to clarify, that is not an accurate statement.
Replace "always leads" with "might lead (depending on what your app is
doing)", then check the credibility of the source.
p
> What I was wondering is:
> If I turn off hot redeployment and use the Tomcat manager to redeploy
> applications, does that solve the problem?
> I would assume that it does not, but any information from the experts
> would be very welcome.
>
>
> Thanks,
> Malcolm Warren
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org