且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Web应用程序[]似乎已经启动了一个名为[Abandoned connection cleanup thread] com.mysql.jdbc.AbandonedConnectionCleanupThread的线程.

更新时间:2021-10-13 15:52:31

请参见

See this answer. It seems that MySQL driver should be in {$TOMCAT]/lib shared between applications. Check that you are not including it with each application. At least it worked for me and I have been able to remove the warning.

如果您使用的是Maven,请标记提供的依赖项.

If you are using Maven mark the dependency as provided.


更新:
根本原因是Tomcat遇到了垃圾回收驱动程序的问题,因为它是在多个应用程序通用的单例中注册的.关闭一个应用程序不允许Tomcat释放驱动程序.参见此 answer .


UPDATE:
root cause is that Tomcat have problems to garbage collect the driver because it is registered in a singleton common to several applications. Closing one application does not allow Tomcat to release the driver. See this answer.