2 Replies Latest reply on Jan 15, 2018 11:28 PM by xguo RSS
    xguo Explorer

    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.


      • Re: Tomcat:insufficient memory java runtime environment

        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.