tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Costin Manolache" <cos...@gmail.com>
Subject Re: Question about Tomcat memory leaks
Date Fri, 11 Apr 2008 13:57:52 GMT
Well, if the _server machine_ is running out of memory - I think
Yourkit/Jprofiler or most java options won't help.
Just make sure you do have the -Xmx option in tomcat - and it's
reasonable ( less than 1/2 of total RAM I would guess ).

Java is very good at using -Xmx for the heap - I never seen it use
more for the heap. You use Jprofiler if you see OutOfMemoryException
or a lot of garbage collection.

The non-heap in java is a different story - like any native code it's
hard to predict or limit. I didn't see leaks (unless a bad JNI library
is used ), but I never found any way to predict how much is needed to
avoid swap ( typically the goal is to use all the memory in the server
you can - but to never swap).
Use the OS tools for that - I have no clue about XP, unix is simple (
top, etc ).

Costin

On Fri, Apr 11, 2008 at 5:30 AM, Henri Gomez <henri.gomez@gmail.com> wrote:
> you could activate jmxremove to track it in real time via JConsole :
>
>  Add these to JAVA_OPTS :
>
>  -Dcom.sun.management.jmxremote.port=8090
>  -Dcom.sun.management.jmxremote=true
>  -Dcom.sun.management.jmxremote.authenticate=false
>  -Dcom.sun.management.jmxremote.ssl=false -Djava.awt.headless=true
>
>  Also commercial products like Jprofiler are definitive good candidates
>  to track memory licks
>
>  Regards
>
>  2008/4/11, Guenter Knauf <fuankg@apache.org>:
>
>
> > Hi all,
>  >  I've a prob with a Tomcat application.
>  >  This is an app which was bought by a customer which I work for.
>  >  The app runs on a plain WinXP box with nothing else installed on it but only the
Tomcat servive + MySQL server. The app is used through the standalone http connector; Tomcat
version is 5.5.25.
>  >  Now since few days the box tends to crash with all memory exhausted...
>  >  I cant tell at the moment if any component of the involved software packages was
updated recently.
>  >  Now my question is: can someone give me some hints how I can observe the memory
consumption of Tomcat to see if there might be a leak either in Tomcat self (saw some BZ,
and ChangeLog entries that something was fixed with 5.5.26), or also with their app?
>  >
>  >  thanks in advance for any suggestions!
>  >
>  >  greets, Guen.
>  >
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  >  For additional commands, e-mail: dev-help@tomcat.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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


Mime
View raw message