tomcat在关闭时,有时会看到类似下面的警告信息:
2014-7-10 13:44:02 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named
[com.taobao.xxx.client.Timer] but has failed to stop it.
This is very likely to create a memory leak.
这是tomcat关闭应用时检测到了应用启动的线程未被终止,tomcat为防止造成内存泄露,给出上面的警告,并根据配置来决定是否强制停止该线程(默认不会强制停止)。
有时也会有另一种相似的警告信息:
2014-7-10 13:44:02 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] 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.
这是tomcat关闭应用时检测到了仍有请求线程未处理完。
上面的2种警告都是在WebappClassLoader的clearReferencesT