tomcat内存泄露
tomcat版本:apache-tomcat-6.0.37
通过kill -9 pid & ./bin/start.sh 进行重启,发先有时候会出现内存泄露日志,并且服务器自动停止,以前好像没有这问题,最近这两天出现了几次这个问题
网上查了几个原因
1.说是dbcp连接池的问题,但是我用的是c3p0连接池
2.有人说是connection没有关闭,或者hibernate的session没有关闭,我使用的spring jdbc框架,应该不涉及connection没有关闭问题,也跟hibernate无关
下面是tomcat打印的日志
Dec 11, 2015 1:28:13 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Dec 11, 2015 1:28:13 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 8 instance(s) to be deallocated
Dec 11, 2015 1:28:14 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 7 instance(s) to be deallocated
Dec 11, 2015 1:28:15 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 4 instance(s) to be deallocated
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-6] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-7] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-8] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-9] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [quartz_Worker-10] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM 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.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [executor2] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM 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.
Dec 11, 2015 1:28:16 PM 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.
Dec 11, 2015 1:28:16 PM 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.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Okio Watchdog] but has failed to stop it. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@198283b]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@796c92]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1c6f2d2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@6fc636]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@3e2e88]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@611f5d]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@524a41]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@8920c1]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@c56e90]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1ddcf1b]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1481972]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@7ebf50]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1424eae]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@3b9291]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@11371cf]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1950e36]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@d8271f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@f07b39]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@29ed1a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@8d7434]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@c83eba]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@8e4690]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@baa58e]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1cb487a]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@1036041]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@a45b4f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@66ab26]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@6e4bfe]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@13f3c00]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1] (value [net.paoding.rose.web.paramresolver.SafedTypeConverterFactory$1@3b5632]) and a value of type [org.springframework.beans.SimpleTypeConverter] (value [org.springframework.beans.SimpleTypeConverter@7c2ee5]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Dec 11, 2015 1:28:16 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抓dump看下吧