We were having severe memory problems too with 5.0.19.
We added this to the jk2.properties:
request.registerRequests=false
and the memory usage was normal again. Somewhat non-obvious, I agree. It also gets rid of "Error registering request" messages in catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux.
Below is the memory profile of one of our servers before and after the change ("old generation memory" refers to the memory buckets in the garbage collector. For more information, see jvmstat. At 100% you will start getting OutOfMemory errors):
before:
20040427-01:03: Using 0% of available old generation memory (853 Mb total)
20040427-13:03: Using 11% of available old generation memory (853 Mb total)
20040428-01:03: Using 13% of available old generation memory (853 Mb total)
20040428-13:03: Using 18% of available old generation memory (853 Mb total)
20040429-01:03: Using 20% of available old generation memory (853 Mb total)
20040429-13:03: Using 25% of available old generation memory (853 Mb total)
20040430-01:03: Using 26% of available old generation memory (853 Mb total)
20040430-13:03: Using 30% of available old generation memory (853 Mb total)
20040501-01:03: Using 32% of available old generation memory (853 Mb total)
20040501-13:03: Using 37% of available old generation memory (853 Mb total)
20040502-01:03: Using 44% of available old generation memory (853 Mb total)
20040502-13:03: Using 51% of available old generation memory (853 Mb total)
20040503-01:03: Using 57% of available old generation memory (853 Mb total)
20040503-13:03: Using 64% of available old generation memory (853 Mb total)
20040504-01:03: Using 65% of available old generation memory (853 Mb total)
20040504-13:03: Using 70% of available old generation memory (853 Mb total)
20040505-01:03: Using 72% of available old generation memory (853 Mb total)
20040505-13:03: Using 76% of available old generation memory (853 Mb total)
20040506-01:03: Using 78% of available old generation memory (853 Mb total)
Tomcat restarted at 81%
after:
20040506-13:03: Using 0% of available old generation memory (853 Mb total) 20040507-01:03: Using 2% of available old generation memory (853 Mb total) 20040507-13:03: Using 2% of available old generation memory (853 Mb total) 20040508-01:03: Using 2% of available old generation memory (853 Mb total) 20040508-13:03: Using 2% of available old generation memory (853 Mb total) 20040509-01:03: Using 2% of available old generation memory (853 Mb total) 20040509-13:03: Using 2% of available old generation memory (853 Mb total) 20040510-01:03: Using 2% of available old generation memory (853 Mb total) 20040510-13:03: Using 2% of available old generation memory (853 Mb total) 20040511-01:03: Using 3% of available old generation memory (853 Mb total) 20040511-11:03: Using 3% of available old generation memory (853 Mb total) 20040512-01:03: Using 4% of available old generation memory (853 Mb total) Tomcat restarted due to system upgrade.
Cheers,
Michiel
Brian Beckham wrote:
I have a site that gets a fair amount of traffic - roughly 300,000 page views per day - a mix of servlets and JSP
The site runs on 3 separate servers - one of which we upgraded to Tomcat 5.0.19. We have been running the site successfully for the past year using Tomcat 4.1.x, and 2 of the servers are still running Tomcat 4.1.x and are fine. Other differences between the two 4.1.x machines and the Tomcat 5.0.19 machine include:
- Tomcat 5.0.19 machine uses jk2 / tomcat 4.1.x servers use mod_jk
- Tomcat 5.0.19 machine using jsvc
The Tomcat 5.0.19 machine is leaking memory at an alarming rate. I am
using the following options on all:
-Xms256 -Xmx1024
The Tomcat 4.1.x machines all run the site and stay around 350MB, but the Tomcat 5.x machine grows until the JVM runs out of memory. The sites are using DBCP, and connecting to an Oracle 10g RAC cluster using the newest JDBC Thin drivers from Oracle (same on all 3).
I plan on running a profiler on the system, but thought I would perform a sanity check and make sure I am not missing something obvious (to someone else).
Thanks,
Brian Beckham
[EMAIL PROTECTED]
Office: 770.924.6444 ext. 203
Mobile: 404.406.8355
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
