Tomcat showing this error “This is very likely to create a memory leak”. How to resolve this issue?

非 Y 不嫁゛ 提交于 2019-12-07 14:49:59

问题


I have created a web application in Apache Cocoon.This website is running properly but after every 3-4 days, it stops responding. It doesn't run until and unless, we restart the tomcat service. In the catalina.2011-05-09.log file, it shows following error:-

"May 9, 2011 3:17:34 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/webresources] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation."

I am not been able to understand the cause of this problem. Can someone suggest me how to resolve this issue?


回答1:


You are using a library that is starting one or more threads and is not properly shutting them down or releasing other resources captured by the thread. This often happens with things like Apache HTTP components (I get this error with Http Components) and anything that uses separate threads internally. What libraries are you using in your Cocoon application?




回答2:


It is telling you the issue:

 [...] is still processing a request that has yet to finish

You need to find out what that request is/is going to. One easy way is to have something like PsiProbe installed.

Also, it's not a bad idea to restart Tomcat every night. It can help alleviate these kinds of issues until you find the root cause.



来源:https://stackoverflow.com/questions/5938233/tomcat-showing-this-error-this-is-very-likely-to-create-a-memory-leak-how-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!