druid 关闭tomcat时,catalina.out产生泄露异常告警

slmsl1lt  于 2022-12-31  发布在  Druid
关注(0)|答案(3)|浏览(207)

发送插入db的请求之后,关闭tomcat,catalina.out中产生泄露异常告警
13-Feb-2018 16:32:45.618 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [cmdb#v1cmdb] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@77cf2c85]) and a value of type [com.alibaba.druid.wall.spi.WallVisitorUtils.WallTopStatementContext] (value [com.alibaba.druid.wall.spi.WallVisitorUtils$WallTopStatementContext@5e986b0d]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

这个是怎么回事呢?我在自定义的listener中deregister了Driver,DataSource的@bean(destroyMethod="close")配置了销毁方法。

fquxozlt

fquxozlt1#

我也反馈了这个警告,希望能有人回复具体原因。

nhaq1z21

nhaq1z212#

感觉是tomcat误报了

ac1kyiln

ac1kyiln3#

开启了 WallFilter 就会有这个警告
[main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@135606db]) and a value of type [com.alibaba.druid.wall.spi.WallVisitorUtils.WallTopStatementContext] (value [com.alibaba.druid.wall.spi.WallVisitorUtils$WallTopStatementContext@518caac3]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

相关问题