PDA

View Full Version : Tomcat 6.0.29 MemoryLeakProblem


mv03
14-09-2011, 13:33
We have deploy our web application on tomcat 6.0.29. After keeping it up for 12-24 hr without any activity it is showing some memory leak problem and shutting down our server automatically . Please find below the log message we are getting ...

Sep 14, 2011 5:09:32 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Sep 14, 2011 5:09:34 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Sep 14, 2011 5:09:36 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

SEVERE: The web application [/RedkneeWebSelfcare] 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.

Sep 14, 2011 5:09:36 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/RedkneeWebSelfcare] appears to have started a thread named [Timer-0] but has failed to stop it.
This is very likely to create a memory leak.
Sep 14, 2011 5:09:36 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

SEVERE: The web application [/RedkneeWebSelfcare] 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.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

SEVERE: The web application [/RedkneeWebSelfcare] 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.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

SEVERE: The web application [/RedkneeWebSelfcare] 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.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

SEVERE: The web application [/RedkneeWebSelfcare] 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.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

SEVERE: The web application [/RedkneeWebSelfcare] appears to have started a thread named [Timer-1] but has failed to stop it.
This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@10eb6ae])
but failed to remove it when the web application was stopped.
This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@fb7efa]) but failed to remove it when the web application was stopped.
This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@14d82e1]) but failed to remove it when the web application was stopped.
This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key
of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1cba031])
but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key
of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1822112])
but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key
of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@4957c7]) b
ut failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap

SEVERE: The web application [/RedkneeWebSelfcare] created a ThreadLocal with key
of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@62 812d])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1220575])
but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Sep 14, 2011 5:09:37 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080


can anyone had face the same problem. its not our application which is leaking but the classes from third parties jars are not gced by tomcat.
any suggestion/workaround is most welcome.

Thanks,
MV

kjkoster
15-09-2011, 08:40
Dear MV,

Looking at the messages, I'd say you need to check the shutdown sequence of that open symphony framework.

Also, where do you register the JDBC driver? You can just have Tomcat manage the database pool for you and use the datasource in the code. That way, it is always properly shut down.

Those thread local things, what framework register those? Again, check its shutdown sequence and close the framework properly.

To start and shut down frameworks properly, register and implement a ServletContextListener (http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContextListener.html).

Hope this helps.

Kees Jan