I'm having memory leakage problems on Tomcat 5.0.18. Here is some insight to my configuration:
IIS6 on Windows Server 2003. Tomcat is communicating with IIS6 using the Tomcat ISAPI redirector. We currently have about 50 virtual hosts on Tomcat. Each one of these hosts use JDBC to connect to our MySQL server which is on the same server.
Our server has two Intel Xeon CPUs running at 2.80 MHz each with 1GB of RAM.
We are running Tomcat as a service with the following options:
-Xrs -Xms64m -Xmx256m
Our websites (all 50 of them) get around 70,000 hits total. Very soon, there will be an additional 50 more same-type websites to this server. All our websites are duplicates of the same site with different designs. Basically, they are running the same application through a second context path (the other context path is the root of our websites).
Our main problem is that whenever we run tomcat, our java.exe keeps growing (I check the mem usage on task manager). It usually starts with something around 100MB. Then all of a sudden, it jumps to 200 something and then keeps growing very very slowly. In about 10 - 12 hours, it becomes something around 400 MB. Even so, all of our websites function without any problems, however it's not OK to have a 400MB java.exe running, because it slows down our server and of course, our websites due to the fact that it starts using the page file.
Apart from java.exe, Tomcat has a heap size of 64 to 256 MB (-Xms64m -Xmx256m). This doesn't show on the task manager. I think this heap is used for our applications. When I monitor it through the tomcat manager status page, everything seems OK. My total memory starts with 64MB, it grows upto 256 MB as needed. Garbage collection seems to be working fine freeing memory in minor and major cycles accordingly. Sometimes the major cycle takes a little long pausing our servers for 30 to 60 seconds, but I'm guessing that this is normal.
I'm planning to change -Xms64m to -Xms128m on our next restart. 64MB is simply too small.
I just noticed today that Tomcat 5.0.19 is released. I will try to upgrade to that at night time when there is not much traffic on our servers. However, I'm afraid that the upgrade won't solve my problem. On the release notes of 5.0.19, I haven't noticed any bug fixes for memory leakage.
How can I stabilize the size of java.exe. We don't want to restart Tomcat server every 12 hours.
Thanks,
Asim
Start Free Trial