tomcat警告总结(待翻译)

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).  There is memory leak (java process still running) but no alarm. It’s dangerous.

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.  Override the contextDestroyed() function to unregister the JDBC driver.


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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值