tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nandish Rudra <>
Subject RE: Memory Usage - Tomcat 5.0.25
Date Mon, 09 Aug 2004 18:39:00 GMT
Hello Yaov,

You are correct I do have a few static varibles that point to running
threads and some other objects. When the application is shutdown I ensure
that each thread is destroyed and all static varibales are set to null,
including thread identifiers, this should let my call to GC clear the

You are also right in saying that i should not depend on undeploy to reclaim
all memory that the webapp was using, and I don't. Like I mentioned I do
make sure all static variables get set to null before the application shuts
down. It would be understandable if not all memory utilized by the webapp is
reclaimed, but in my case absolutely no memory is being reclaimed. For
example, say, i start tomcat and it starts with 30M initial memory usage
without the application. Now when i deploy the application the size jumps by
8M to 38M. As the app is undeploy and re-deploy the memory usage jumps from
38M to 46-47M.

Now this, if I am not wrong, is not how things should be. I would appreciate
anymore suggestion that you or anyone may have.

-----Original Message-----
From: Shapira, Yoav []
Sent: Monday, August 09, 2004 1:35 PM
To: Tomcat Users List
Subject: RE: Memory Usage - Tomcat 5.0.25

I have a couple of ideas.  One is that your webapp maintain static or
shared references to objects that prevent them from being garbage
collected, and therefore memory from returning to the heap.  Another is
that a webapp undeploy is not guaranteed to reclaim all memory used by
the webapp anyways so to count on this behavior is not smart.  It is
expected that every time you reload your webapp the overall memory usage
of the server will go up a bit, as not all objects are gone (for
example, if you have a static reference than the old classloader and
anything that references it strongly will remain in memory).

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Nandish Rudra []
>Sent: Monday, August 09, 2004 1:17 PM
>To: Tomcat Users List (E-mail)
>Subject: Memory Usage - Tomcat 5.0.25
>I am having some memory issues while deploing/undeploying web
>to Tomcat. I am using Tomcat 5.0.25 with Java 2 SDK version 1.4.2_04
>1.6.1 on GNU Linux 2.4.20-8. I use ant to compile my web application
>Tomcat's catalina-ant.jar to deploy it automatically.
>Here is my problem. When I undeploy/remove an application, Tomcat does
>reclaim the memory being used by the web application and when the
>application is re-deployed/re-installed a significant increase in
memory is
>seen. This increase is obviously the memory usage by the new instance
>web application.
>Does anyone have any idea as to why this is happening?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message