Tomcat memory usage grows until crash with no GC run

Posted by Phil on Server Fault See other posts from Server Fault or by Phil
Published on 2010-05-11T00:54:32Z Indexed on 2010/05/11 1:04 UTC
Read the original article Hit count: 334

I'm administrating a server running Tomcat that is getting a lot of traffic lately.

If I monitor memory usage in Task Manager I can see the memory usage growing and eventually tomcat crashes around the 1GB mark.

Here's the memory relevent bits I've set in Tomcat Properties (this is a Windows Server):

Intial memory pool: 1024 MB
Maximum memory pool: 1024 MB
-XX:MaxPermSize=256M

The weird thing is since these problems arose I've deployed Lambda Probe to the Tomcat instance and the memory usage values I see there are much lower, for example Task Manager might show 467MB used while the "Total" used in Probe is 212 MB. Also, the Maximum Total listed in Probe is 1.29GB, when I would have expected 1GB, the maximum memory set above.

If I force the garbage collector to run using Probe, I can keep Tomcat from crashing for a while (indefinitely, AFAIK). So why doesn't the GC run automatically and stop Tomcat from crashing?

Thanks.

© Server Fault or respective owner

Related posts about tomcat

Related posts about memory-usage