cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Tomcat:insufficient memory java runtime environment

向郭
1-Newbie

Tomcat:insufficient memory java runtime environment

Dear all,

Recently ,our tomcat frequently stop,please help me analyze how to repair it,thank you.environment: windows sever 2008,tomcat 8,Thingworx 7.2.

1.jpg2.jpg3.jpg4.jpg5.jpg6.jpg

2 REPLIES 2

This error can be caused by a limit on the number of maximum threads or from a lack of memory. This can also be caused by an OS imposed limit on threads, but this is less common.


Start by checking to see if you're hitting the limit on your thread pool in Tomcat. Check your configuration in conf/server.xml. In the section for your connector, there should be a 'maxThreads' setting. By default this is set to 150. You can increase this, restart Tomcat and see if the problem is corrected.


If it's memory related, you need to either increase the memory available to the application or lower the memory requirement for each thread. To do the later, you can change the thread stack size with the -Xss argument to the JVM. To find the ideal value, start with it as very low, like 128K or 256K, and see if you get any OutOfMemory exceptions. If you do, increase until they go away.

Thank you Jeremy, I will take a try tomorrow(Chinese time) .

Top Tags