Memory leak in a Java web application

后端 未结 8 1852
借酒劲吻你
借酒劲吻你 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条回答
  •  萌比男神i
    2021-01-31 20:15

    As this sounds unspecific, one candidate would have been JSF. But then I would have expected hash maps leaking too.

    Should you use JSF: In web.xml you could try:

    • javax.faces.STATE_SAVING_METHOD client
    • com.sun.faces.numberOfViewsInSession 0
    • com.sun.faces.numberOfLogicalViews 1

    As for tools: JavaMelody might be interesting for continual statistics, but needs effort.

提交回复
热议问题