You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Crowther <pe...@melandra.com> on 2010/03/01 09:14:16 UTC

Re: possible memory leak tomcat 6?

On 27 February 2010 20:26, Sander de Boer <sa...@eo.nl> wrote:
> Hi,
>
> My tomcat server gives often a out of mem.
> When dumping the heap I found much instances of these objects:
>
> Class InstanceCount TotalSize
> class org.apache.tomcat.util.buf.ByteChunk 439493 20656171
> class org.apache.tomcat.util.buf.CharChunk 432383 16862937
> class org.apache.tomcat.util.buf.MessageBytes 414753 24055674
>
> My configuration:
> Tomcat: 6.0.16
> Java: 1.6.0_14
> OS: Solaris 10
>
> Can this be a memory leak in Tomcat?

It's not impossible that you've found an edge case in Tomcat, but
Tomcat has been tested very heavily in high-traffic sites for many
years and memory leaks have been removed as they're found.  The
experience on the list is that it's far more likely to be something in
your application that's holding on to Tomcat objects.

I'd suggest analysing that heap dump in more detail with one of the
heap analysis tools.  Find a few of the objects that you think are
causing the problem and trace back their references - what's holding
on to them?

Also, Pid makes a very important point.  Are you sure you have the
right objects?  You've chosen these classes, presumably because they
have the highest total byte count?  Or the highest total number of
instances?  I'd be looking down the list to see what other classes
have unexpectedly high instance counts, and seeing what they hold on
to.

- Peter

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