Stephanie Wullbieter schrieb:
Dear list members,
a tomcat machine has a problem because java eats the memory up. Here some data:
1.555.828 KiB host RAM
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
Tomcat Version 4.1.31
java ist started with the command /home/tomcatp/prod/java2/bin/java
-Dtomcat.worker=2 -server -Djava.library.path=/home/tomcatp/prod/dctm5/dfc
-Xmx768m -verbose:gc -Dcom.sun.jndi.ldap.connect.pool.timeout=60000
-Dcom.sun.jndi.ldap.connect.pool.maxsize=5000 -Djava.awt.headless=true
-Djava.endorsed.dirs=/home/tomcatp/prod/tomcat4/common/endorsed -classpath
/home/tomcatp/prod/dctm5/dfc/dfc.jar:/home/tomcatp/prod/dctm5/dfc/bsf.jar:/home/tomcatp/prod/dctm5/dfc/log4j.jar:/home/tomcatp/prod/dctm5/dfc/xalan.jar:/home/tomcatp/prod/dctm5/dfc/xml-apis.jar:/home/tomcatp/prod/dctm5/dfc/workflow.jar:/home/tomcatp/prod/dctm5/dfc/subscription.jar:/home/tomcatp/prod/dctm5/dfc/xforms.jar:/home/tomcatp/prod/dctm5/dfc/All-MB.jar:/home/tomcatp/prod/dctm5/dfc/ci.jar:/home/tomcatp/prod/dctm5/dfc/bpmutil.jar:/home/tomcatp/prod/dctm5/dfc/mail.jar:/home/tomcatp/prod/dctm5/dfc/activation.jar:/home/tomcatp/prod/dctm5/config:/home/tomcatp/prod/java2/lib/tools.jar:/home/tomcatp/prod/tomcat4/bin/bootstr
ap.
jar -Dcatalina.base=/home/tomcatp/prod/tomcat4
-Dcatalina.home=/home/tomcatp/prod/tomcat4
-Djava.io.tmpdir=/home/tomcatp/prod/tomcat4/temp
org.apache.catalina.startup.Bootstrap start
After e.g. 14 days running (200 application users), the java applications on
the tomcat get instable, i think due to memory problems because the memory of
the host gets eaten slowly but constantly up. In the end it looks like this:
free -k
total used free shared buffers cached
Mem: 1555828 1522108 33720 0 71984 78676
-/+ buffers/cache: 1371448 184380
Swap: 265064 265064 0
So the host seems to be under memory pressure and it's a question of time that
it comes to instability.
ps aux
tomcatp 19814 0.7 85.5 1860356 1330700 ? Sl Apr08 152:48
/home/tomcatp/prod/java2/bin/java -Dtomcat
The Java VM has no OutOfMemory failures, the JVM usage is about 600 MiB, and
does not go over 700 MiB (768 MiB JVM Heap).
So it looks like Java VM is using about 700 MiB for itself. Is that normal?
Yesterday the tomcat got problems with one application. So I switched to a
fallback server and did not restart the tomcat but only reloaded the little
application that did not work properly anymore. So there were no users anymore
on that tomcat. And now, after 12h, the memory usage of java is still the same,
it has not decreased. So what's up there? Why is there no memory freed if the
applications are not used anymore? When the tomcat is started, java only uses
300 MiB overall, then it increases constantly.
It would be fine, if someone could help me or give me a tip how to analyze the
tomcat to get more info what could be the problem.
Could it be a solution to decrease the JVM heap?
Just a shot in the dark (since you are using somewhat old versions of
everything): there was a bug in java.io.File.deleteOnExit() that lead to
a leak in native memory. This problem hit a lot of code using
File.deleteOnExit(), e.g. commons-fileupload and others.
See:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513817
https://issues.apache.org/jira/browse/FILEUPLOAD-95
http://blogs.sun.com/chegar/#diagnosing_deleteonexit_issues
Regards,
Rainer
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]