Memory leak in tomcat 6.0.29 with grails 1.3.7
I am using Tomcat 6.0.29 to deploy my production war of Grails 1.3.7 on windows and linux machine.I haven't get any issue during application development,But when i deploy war and start/stop application through tomcat manager, i got below stacktrace in tomcat catalina log file.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/AppName] 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.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/AppName] 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.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/AppName] created a ThreadLocal with key of type [null] (value [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$1@87b2c8]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/AppName] created a ThreadLocal with key of type [null] (value [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$2@ea95e0]) and a value of type [java.lang.Integer] (value [0]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/AppName] created a ThreadLocal with key of type [null] (value [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$1@87b2c8]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/AppName] created a ThreadLocal with key of type [null] (value [org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor$2@ea95e0]) and a value of type [java.lang.Integer] (value [0]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 17, 2011 7:43:21 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/AppName] created a ThreadLocal with key of type [null] (value [org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory$2@1283b68]) and a value of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 17, 2011 7:43:56 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.mysql.jdbc.SQLError. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
Thank you in advance for your answers!
This is apparently a recognized problem: ReloadAwareAutowireCapableBeanFactory - Memory leak
and will be corrected in next version: tomcat threadlocal memory leak
In the last link, they said that will be fixed in 1.4 but that release was merged with 2.0: Grails 1.4 is now Grails 2.0 . 2.0 M1 will be released at the end of July .
精彩评论