You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Saurabh Saraswat <ss...@pivotalindia.com> on 2013/09/19 07:53:06 UTC

Tomcat classes from previous run remains

Dear All,

I am running an j2ee application which uses spring, hibernate, jsf, etc.
the application also uses ha-jdbc to make the databases highly available.
when the application is deployed for the first time, the app runs smoothly,
but when it is un-deployed and deployed back, tomcat gives the following
error:

The following web applications were stopped (reloaded, undeployed), but
their classes from previous runs are still loaded in memory, thus causing a
memory leak (use a profiler to confirm):

I am wondering how to get rid of this problem.

One Solution is restarting the server.
Please let me know the solution with out restarting the server if any.

Thanking You!!


*Best Regards,    *

*Saurabh Sarasvat*

Re: Tomcat classes from previous run remains

Posted by Daniel Mikusa <dm...@gopivotal.com>.
On Sep 19, 2013, at 1:53 AM, Saurabh Saraswat <ss...@pivotalindia.com> wrote:

> Dear All,
> 
> I am running an j2ee application which uses spring, hibernate, jsf, etc.
> the application also uses ha-jdbc to make the databases highly available.
> when the application is deployed for the first time, the app runs smoothly,
> but when it is un-deployed and deployed back, tomcat gives the following
> error:
> 
> The following web applications were stopped (reloaded, undeployed), but
> their classes from previous runs are still loaded in memory, thus causing a
> memory leak (use a profiler to confirm):
> 
> I am wondering how to get rid of this problem.

I'd suggest you start by reading this.  It's a good introduction to the problem.

  https://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf

Then get a Profiler and follow the steps on slide #11.  Once you figure out what is holding a reference to your application, you can determine where you go from there to fix it.  Sometimes it something you need to fix in your code, sometimes it's something in a third party library that needs fixed.

Further detail can be found on the FAQ here.

   https://wiki.apache.org/tomcat/MemoryLeakProtection
   https://wiki.apache.org/tomcat/OutOfMemory

> 
> One Solution is restarting the server.

This is one possible solution, although it limits the functionality of Tomcat.

> Please let me know the solution with out restarting the server if any.

See above for the suggested solution.

Dan

> 
> Thanking You!!
> 
> 
> *Best Regards,    *
> 
> *Saurabh Sarasvat*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org