tomcat 6.0.29中的内存泄漏,带有grails 1.3.7

时间:2011-05-18 07:07:01

标签: grails memory-leaks jvm tomcat6

我正在使用Tomcat 6.0.29在Windows和Linux机器上部署Grails 1.3.7的生产战争。我在应用程序开发期间没有遇到任何问题,但是当我通过tomcat管理器部署war并启动/停止应用程序时,我在tomcat catalina日志文件中得到了下面的堆栈跟踪。

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.

提前感谢您的回答!

1 个答案:

答案 0 :(得分:0)

这显然是一个公认的问题: ReloadAwareAutowireCapableBeanFactory - Memory leak

将在下一版本中更正: tomcat threadlocal memory leak

在最后一个链接中,他们说将在1.4中修复,但该版本与2.0合并: Grails 1.4 is now Grails 2.0 。 2.0 M1将于7月底发布。