You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chandu <ch...@translogicsys.com> on 2004/04/01 15:19:46 UTC

OutOfMemoryError - Excessive class loading

Guys,

I am getting java.lang.OutOfMemoryError when I start/stop/start/stop... a specific context multiple times.
I am using Optimizeit to profile my application. I found multiple class definitions are being held by tomcat
of same class. Everytime the context is restarted(using the Manager application), of course, the classes
will be loaded again. As developing the application, I used to start/stop a specific context so many times.
However, when the restarts of context(without shutting down the tomcat instance) exceeds 30 or 40 I am
getting the out of memory error.

More specifically I would like to know:

When a context is stopped, does all the resources will be released? This includes stopping of threads
if any and unloading of all classes which are loaded during the context lifecycle.

Can anyone please help me in solving this?

- Chandu.