Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hibernate 我在tomcat控制台中收到内存泄漏异常_Hibernate_Tomcat_Jdbc_Memory Leaks_Struts2 - Fatal编程技术网

Hibernate 我在tomcat控制台中收到内存泄漏异常

Hibernate 我在tomcat控制台中收到内存泄漏异常,hibernate,tomcat,jdbc,memory-leaks,struts2,Hibernate,Tomcat,Jdbc,Memory Leaks,Struts2,当您的webapp运行时,这大概不会导致问题,只是当您使用Tomcat管理器停止webapp时,您看到了这些错误 Tomcat无法释放Web应用程序使用的所有内存,因此在某个时候,如果反复重新启动Web应用程序,Tomcat将耗尽内存。看起来您正在创建许多未清理的线程局部变量 你的选择是: 找出为什么这些本地人没有被清理。关于跟踪Tomcat中的这种内存泄漏,有很多信息 重新启动Tomcat本身,而不是使用Tomcat manager重新启动您的Web应用程序。如果您在Tomcat实例中有任何

当您的webapp运行时,这大概不会导致问题,只是当您使用Tomcat管理器停止webapp时,您看到了这些错误

Tomcat无法释放Web应用程序使用的所有内存,因此在某个时候,如果反复重新启动Web应用程序,Tomcat将耗尽内存。看起来您正在创建许多未清理的线程局部变量

你的选择是:

  • 找出为什么这些本地人没有被清理。关于跟踪Tomcat中的这种内存泄漏,有很多信息
  • 重新启动Tomcat本身,而不是使用Tomcat manager重新启动您的Web应用程序。如果您在Tomcat实例中有任何其他实时Web应用程序,这不是一个好的选择,但如果您的Web应用程序是唯一的,则完全可以接受
  • 上面的一个变体是:使用管理器重新启动您的webapp,但注意它正在使用多少内存(泄漏可能不是特别严重)。然后在必要时重新启动Tomcat。您可能会发现,在需要完全重新启动Tomcat之前,您可以安全地重新启动webapp很多次

我不确定您使用的是哪个版本的struts2,请确保用struts2标签标记您的struts2问题,否则您将无法获得适当的注意

这是struts2早期版本中的已知错误之一,该错误在
2.3.3
中得到修复。停止/取消部署/重新部署S2应用程序时,localContext ThreadLocal未正确清理。在大多数情况下,这将导致web应用程序类加载器不会被垃圾收集,从而导致内存泄漏

请交叉检查您使用的Struts2版本,如有必要,请将其升级至最新版本


有关更多详细信息,请参阅Tomcat内置了对某些永久性生成内存泄漏情况的检测。这是我不久前写的一篇博文,解释了PermGen泄漏的原因:。您应该检查应用程序,找出Tomcat发现的问题的原因。我觉得那些日志很容易解释。

你的问题是什么?你刚才说了一些你观察到的事情。你提到的第二个选项是错误的,停止tomcat本身而不是使用app manager没有什么区别。Tomcat无论如何都会记录这些消息,因为它会在关闭自己之前关闭应用程序。只是想把事情弄清楚。
Aug 29, 2012 12:47:44 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-443
Aug 29, 2012 12:47:44 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-80
Aug 29, 2012 12:47:45 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JBDC 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.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-1] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MultiThreadedHttpConnectionManager cleanup] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-3] but has failed to stop it. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@3d1848]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1055eb1]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@1720e5c]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@10cc503]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@15a82f7]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@14c4cc7]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@44aeeb]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@137fac1]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@2fa904]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1016caf]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@867ca8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@162062c]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@8345e0]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.commons.lang.builder.ToStringStyle$1] (value [org.apache.commons.lang.builder.ToStringStyle$1@60994a]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1eff48d]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@a05e2e]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@872ebe]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@10dbc37]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@bfd4f6]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@366c17]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@f2938f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@1b593d2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1fbe9e6]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1b9305f]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@116d3cf]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1abf1f6]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@19a61d3]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@8c6891]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@254464]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@ad40e8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@807a29]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@d440fc]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@f663e4]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@183b5d]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@67272d]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@e16306]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 29, 2012 12:47:45 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1] (value [org.apache.xml.security.utils.UnsyncByteArrayOutputStream$1@18bbe2b]) and a value of type [byte[]] (value [[B@12c4f94]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.