You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Clarke-Fields <wf...@dadebehring.com> on 2007/12/14 16:36:57 UTC

Tomcat Process Memory Leak?

Hi All,
I am looking for some help.  We are running into what appears to be a memory
leak situation.  The Java heap usage looks fine, but the overall Tomcat
process memory usage continuously goes up and up, until it reaches the
Windows 2GB per process limit, at which point it crashes.

Using the Windows Performance Monitor, I am tracking the "Virtual Bytes"
value of the Tomcat process.  Upon Tomcat startup, it is at around 1.1GB. 
It then increases over time, sometimes fluctuating up and down a small
degree, but the general trend is always upwards.  Sometimes it jumps 40MB or
more at a time.  Eventually it hits the 2GB limit, and then the application
stops responding and we get out of memory errors: "unable to create new
native thread".  Sometimes this takes 20 hours, sometimes it only takes 8
hours.  

We are running a third-party app on Tomcat 5.0.28 with Java 1.4.2_11.  The
machine is running Windows Server 2003 and has 2.5GB physical memory.  We
have the heap size set to 928MB.  

We have plans to upgrade to Tomcat 5.5.16 and Java 1.5_06 (which is also
supported by the application vendor), but this will take some time, since we
are in a validated environment.

Any ideas about what could be causing this?  I realize it could be an
application-related leak, but in that case wouldn't we see it running out of
heap?

Thanks!
-Bill
-- 
View this message in context: http://www.nabble.com/Tomcat-Process-Memory-Leak--tp14337929p14337929.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat Process Memory Leak?

Posted by Bill Clarke-Fields <wf...@dadebehring.com>.
Thank you both for your responses.  I am also pretty convinced now that it is
an application-related issue.  Especially since the memory usage jumps ~30mb
in a few seconds.  My investigation continues.


Travis Haagen wrote:
> 
>> Any ideas about what could be causing this?  I realize it could be an
>> application-related leak, but in that case wouldn't we see it running out
> of
>> heap?
> 
> Server-side application leaks are really hard to figure out, because they
> usually only happen in a high-traffic production environment and are
> difficult to produce on development machines.
> 
> Basically, you should look at bug reports (e.g., bugzilla) for all of the
> 3rd party libraries that your application uses, or at least those
> libraries
> that have been added/upgraded since this problem started occuring. For
> each
> component, search for 'memory leak' and see where that gets you.
> 
> Good luck,
> 
> Travis
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-Process-Memory-Leak--tp14337929p14373437.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Tomcat Process Memory Leak?

Posted by Travis Haagen <ha...@comcast.net>.
> Any ideas about what could be causing this?  I realize it could be an
> application-related leak, but in that case wouldn't we see it running out
of
> heap?

Server-side application leaks are really hard to figure out, because they
usually only happen in a high-traffic production environment and are
difficult to produce on development machines.

Basically, you should look at bug reports (e.g., bugzilla) for all of the
3rd party libraries that your application uses, or at least those libraries
that have been added/upgraded since this problem started occuring. For each
component, search for 'memory leak' and see where that gets you.

Good luck,

Travis


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


RE: Tomcat Process Memory Leak?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Bill Clarke-Fields [mailto:wfields@dadebehring.com] 
> Subject: Tomcat Process Memory Leak?
> 
> Any ideas about what could be causing this?  I realize it 
> could be an application-related leak

Not just could be, it almost definitely is, since this behavior isn't
seen normally.

> but in that case wouldn't we see it running out of heap?

Is there any native code in the app?  Does it create its own threads and
forget to terminate them?  Is it opening files and not closing them?  Is
it making connections to external resources and not disposing of them?

Since it died trying to create more threads, it sounds like the webapp
is doing something under the covers not within Tomcat's control.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org