关闭tomcat时提示memory leak警告解决办法
来源:互联网 发布:一直是正在准备windows 编辑:程序博客网 时间:2024/05/22 07:40
原文地址:http://blog.sina.com.cn/s/blog_81b86edf01014nrq.html
当我们关闭tomcat 或者redeploy project时, 仔细看的话,会有一些error跳出来。 这些是一些memory leak的问题,自tomcat 6.0.24以后tomcat增加的安全检测机制。
不要忽视这些问题,它可能会造成memory leak, 就是tomcat关闭以后,还有thread在跑。。。 这是非常不安全,并会对服务器的稳定造成很大影响的,下面是一些总结,工作时候发给同事的,没翻译,有需要的话就将就着看吧。Overall, the reason for these alarms is from tomcat 6.0.24, there is a new function called memory leak protection. Refer to http://wiki.apache.org/tomcat/MemoryLeakProtection. This is a good function to make our applications and server better. And there is some suggestion in this web page. Include 'JDBC driver registration' problem.
The tomcat version below 6.0.24 does not alarm these memory leak problems, but the problem is exist. (I’ve tried tomcat 6.0.20).
For JDBC driver registration problem.
SEVERE: The web application [/xxx] registered the JDBC 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. Pls refer to http://bugs.mysql.com/bug.php?id=62170.
This is not regard as a bug(whatever, it has been forcibly unregistered already), we can unregister the driver by extends the lifecycle listener of spring framework. Such as org.springframework.web.context.ContextLoaderListener.
For mysql connector 其他问题
When we are using mysql connector version 5.0.5 (mysql-connector-java-5.0.5.jar):
MySql Bug 1: The web application [/xxx] 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.
This bug was reported at version 5.1.6 and already been fixed already in the future version of MySql. Refer to http://bugs.mysql.com/bug.php?id=36565.
When we are using mysql connector version 5.1.22 (mysql-connector-java-5.1.22.jar):
MySql Bug 2: SEVERE: The web application [/xxx] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
This bug was reported at version 5.1.21 and its status is ‘IN PROGRESS’, it means it’s not fixed yet. Refer to http://bugs.mysql.com/bug.php?id=65909.
So I’m using the mysql connector 5.1.20 (mysql-connector-java-5.1.20.jar), everything looks good.
- 关闭tomcat时提示memory leak警告解决办法
- 关于tomcat在关闭时的memory leak日志信息的解释
- tomcat memory leak
- tomcat运行过程中提示警告解决办法
- wamp关闭警告提示
- Memory Leak Protection in Tomcat 7
- tomcat多次部署项目导致memory leak
- 解决tomcat报错memory leak问题
- VC 关闭Warning警告提示
- Memory Leak
- memory leak
- Memory leak
- Tomcat stop时c3p0连接池线程无法关闭警告
- tomcat启动时报to prevent a memory leak
- tomcat very likely to create a memory leak.
- tomcat管理界面部署项目多次导致memory leak
- 采用数据库连接池连接到mysql时,因应用中没有关闭ResultSet导致的memory leak问题
- SSH框架 Tomcat报错 内存泄漏的解决办法This is very likely to create a memory leak. Stack trace of thread: java.ne
- 十种更好的表达“你的代码写的很烂”的方法
- 程序员的梦想
- 利用/dev/zero创建虚拟硬盘
- strcat与strcpy与strcmp与strlen
- linux系统用户以及用户组管理
- 关闭tomcat时提示memory leak警告解决办法
- 如何在setting里面添加自己的值
- 腾讯马化腾的万字演讲-微信和手Q的交锋。
- ASPxComboBox
- 浏览器内核的整理稿
- C++在运行状态下修改替换函数逻辑
- /dev/zero和/dev/null的区别
- 编程名言名句
- 目标追踪综述