Memory leak in a Java web application

后端 未结 8 1762
借酒劲吻你
借酒劲吻你 2021-01-31 19:24

I have a Java web application running on Tomcat 7 that appears to have a memory leak. The average memory usage of the application increases linearly over time when under load (d

8条回答
  •  再見小時候
    2021-01-31 20:09

    By accident, I stumbled across the following lines in our Tomcat's conf/catalina.properties file that activate String caching. This might be related to your case if you have any of them turned on. It seems others are warning to use the feature.

    tomcat.util.buf.StringCache.byte.enabled=true
    #tomcat.util.buf.StringCache.char.enabled=true
    #tomcat.util.buf.StringCache.trainThreshold=500000
    #tomcat.util.buf.StringCache.cacheSize=5000
    

提交回复
热议问题