Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

Phil,

You need to tune your JVM configuration. Take a look to the JMV configuration I'm using in my Tomcat server that is behaving very well under heavy traffic:

http://acevedoalberto.wordpress.com/2009/01/16/hello-world/

Alberto

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.