这问题困扰很久了,以前只是一两月发生一次就没在意,每次重启tomcat就很正常了。但是现在是基本上坚持不了一天就需要重启tomcat就要重启,否则出现的问题简直不可理喻,比如提交表单数据到action,比如hibernate级联取值,这些都会报空指针异常,而这些都实实在在的有数据提交啊,同样的代码,只是时间不同就出现不一样的结果。自己也分析了很久,从开始分析代码本身,并没有发现什么不对,再分析配置,配置还是以前那个配置,没任何变化,后来分析tomcat,因为jvm之前报了好几次内存溢出的异常,我就优化jvm,现在没报内存溢出了,但是确出现功能性异常,这些功能在我本地没有任何问题,在服务上启动tomcat之初也没问题,只是用久了会出问题,比如现在是一天不到就算久了。。。以前是一个月半个月不用理睬就没事
每次重启tomcat都会有很多“严重”的提示信息,都提示说可能导致内存溢出。以前没有过,所以每次shutdown的时候都要很长时间才能关掉,唉现在搞得想无头苍蝇似的,有经历的朋友希望给个思路把,比死都难受额
关闭tomcat的时候出现了下面这些严重提示,只截取了部分,其他都一样了
信息: Pausing ProtocolHandler ["http-nio-8080"]
2013-6-3 0:31:04 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-apr-8050"]
2013-6-3 0:31:05 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
2013-6-3 0:31:05 de.javakaffee.web.msm.MemcachedSessionService shutdown
信息: Stopping services.
2013-6-3 0:31:05 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: 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.
2013-6-3 0:31:05 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [AWT-Windows] but has failed to stop it. This is very likely to create a memory leak.
2013-6-3 0:31:05 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [Resource Destroyer in BasicResourcePool.close()] but has failed to stop it. This is very likely to create a memory leak.
2013-6-3 0:31:05 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10](value [com.opensymphony.xwork2.inject.ContainerImpl$10@10d0bdc]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@185a977]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2013-6-3 0:31:10 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal](value [Transactional resources]) and a value of type [java.util.HashMap](value [{org.hibernate.impl.SessionFactoryImpl@15ebb08=org.springframework.orm.hibernate3.SessionHolder@38f49f, com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [numThreadsAwaitingCheckoutDefaultUser] ]=org.springframework.jdbc.datasource.ConnectionHolder@1dc8b67}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2013-6-3 0:31:10 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal](value [java.lang.ThreadLocal@c92222]) and a value of type [org.compass.core.impl.DefaultCompassSession](value [org.compass.core.impl.DefaultCompassSession@e00662]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2013-6-3 0:31:10 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10](value [com.opensymphony.xwork2.inject.ContainerImpl$10@10d0bdc]) and a value of type [java.lang.Object[]](value [[Ljava.lang.Object;@1c30f74]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2013-6-3 0:31:10 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。