由于内存泄漏导致tomcat崩溃

时间:2014-07-07 22:30:37

标签: java tomcat memory-leaks hbase

由于内存泄漏,tomcat崩溃了。这是catalina.out。基于以下日志,任何线程导致和可能修复的想法

SEVERE: The web application [/testapp] appears to have started a thread named [hbase-tablepool-168-thread-1] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [hbase-tablepool-169-thread-1] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [IPC Client (47) connection to ip-XX-XX-XX-XX.ec2.internal/XX-XX-XX-XX:60020 from tomcat] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [IPC Client (47) connection to ip-XX-XX-XX-XX.ec2.internal/XX-XX-XX-XX:60020 from tomcat] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [IPC Client (47) connection to ip-XX-XX-XX-XX.ec2.internal/XX-XX-XX-XX:60020 from tomcat] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [IPC Client (47) connection to ip-XX-XX-XX-XX.ec2.internal/XX-XX-XX-XX:60020 from tomcat] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/testapp] appears to have started a thread named [hbase-tablepool-170-thread-1] but has failed to stop it. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/testapp] created a ThreadLocal with key of type [org.apache.hadoop.io.Text$1] (value [org.apache.hadoop.io.Text$1@1dba6717]) and a value of type [sun.nio.cs.UTF_8.Encoder] (value [sun.nio.cs.UTF_8$Encoder@38c62640]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

Jul 07, 2014 2:51:38 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

SEVERE: The web application [/testapp] created a ThreadLocal with key of type [org.apache.hadoop.io.Text$1] (value [org.apache.hadoop.io.Text$1@1dba6717]) and a value of type [sun.nio.cs.UTF_8.Encoder] (value [sun.nio.cs.UTF_8$Encoder@58f950de]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

Jul 07, 2014 2:51:39 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

1 个答案:

答案 0 :(得分:0)

HTablePool似乎已被弃用,但是创建它的人(希望是Servlet或过滤器)应该在close()方法中调用destroy()