tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Johnsson" <Per.Johns...@omxgroup.com>
Subject RE: Tomcat Memory Usage
Date Mon, 14 May 2007 11:33:58 GMT

Ok, turn on the -verbose:gc and -XX:+PrintGCDetails and see if you could
find any strange things in the logs. 

I have seen that when the jvm is making big full garbage collection the
jvm practicaly halts for several seconds which could cause some strange
behaviors. We had for example a xsl-stylesheet which used the mozilla
javascript functions and that singe stylesheet generated very big full
gc's.

Check this page for which options you can run on your version of java
1.5 they are different depending on the versions.

http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp

/Regards Per Jonsson

-----Original Message-----
From: Jerome Benezech [mailto:jbenezech@yahoo.com] 
Sent: den 14 maj 2007 12:33
To: Tomcat Users List
Subject: RE: Tomcat Memory Usage

Hi,
We're on Java 1.5 and do not get any OutOfMemory but after some point,
Tomcat uses 50% of the server memory and stops serving requests.


--- Per Johnsson <Per.Johnsson@omxgroup.com> wrote:

> Hi!
> 
> If you get OutOfMemory Errors and running java 1.6 (maybe later 
> versions of java 1.5) you can make the vm to save a memory dump which 
> you could load in ie. YourKit java profiler. And After a crach you 
> could analyse the memroy in your applications.
> 
> I did that resently and it works like a charm.
> 
> This is the parameters I used:
> -verbose:gc
> -XX:HeapDumpPath=C:\Java\heapdump
> -XX:+HeapDumpOnOutOfMemoryError
> -XX:+PrintGCDetails
> 
> You could also look in the gc_log, sometimes you could see what's 
> released and what needs correcting when jvm is doing a full gc.
> 
> Hope it helps.
> 
> (If you don't run java6 I can recommend it, faster and better :-)
> 
> /Regards Per Jonsson
> 
> -----Original Message-----
> From: Jerome Benezech [mailto:jbenezech@yahoo.com]
> Sent: den 14 maj 2007 11:21
> To: users@tomcat.apache.org
> Subject: Tomcat Memory Usage
> 
> Hi all,
> 
> I run a cocoon webapp which is hosted on a shared Linux environnement 
> and runs under tomcat 5.5.9.
> There are about 7 applications running under that tomcat instance (2 
> cocoon, at least 1 jsp, don't know for the others).
> My host provider complains that he tomcat uses a lot of memory and 
> that he needs to restart it every 4 hours to release the memory.
> Tomcat runs as a daemon (started using jsvc) and with the following
> parameters:
> 
> jsvc.exec -user tomcat -cp ./bootstrap.jar 
> -Djava.endorsed.dirs=../common/endorsed
> -java.awt.headless=true -Xmx500000000
> -XX:MaxPermSize=300m -debug -outfile
> ../logs/catalina.out -errfile ../logs/catalina.err -verbose 
> org.apache.catalina.startup.Bootstrap
> -security
> 
> I'm really not sure where to start looking: memory leak due to bad 
> programming in the webapp or bad tomcat configuration leading to 
> memory leaks.
> I also noticed there are quiet a few links in google pointing to 
> problems with Tomcat not releasing memory (objets not getting 
> garbage-collected), although they are mostly related to Tomcat 4.x. 
> What is the situation on with Tomcat 5.5.9 ?
> 
> I'm looking for help on what to look for, what configuration 
> parameters should be used in production environnement, how can I 
> pinpoint this memory problem ?
> 
> Cheers,
> Jerome
> 
> 
> 
> 
> Jerome Benezech
> jbenezech@yahoo.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
> 
> 
>
************************************************************************
********
> This e-mail and the information it contains may be privileged and/or 
> confidential.  It is for the intended addressee(s) only.
> The unauthorised use, disclosure or copying of this e-mail, or any 
> information it contains, is prohibited.
> If you are not an intended recipient, please contact the sender and 
> delete the material from your computer.
>
************************************************************************
********
> 
> 
> 
>
---------------------------------------------------------------------
> 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
> 
> 


Jerome Benezech
jbenezech@yahoo.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


********************************************************************************
This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information it contains,
is prohibited. 
If you are not an intended recipient, please contact the sender and delete the material from
your computer.
********************************************************************************



---------------------------------------------------------------------
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


Mime
View raw message