proxool抛出的警告:was active for 305188 milliseconds and has been removed automatical

2011-12-9 7:31:21 org.logicalcobwebs.proxool.HouseKeeper sweep
警告: #0002 was active for 305188 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-8080-2', but the last SQL it performed is unknown because the trace property is not enabled.

 

上次操作数据库的 连接对象connection 没有关闭,关闭之后connection.close(); 也就OK了!

产生如上警告的原因是:proxool中有一个参数maximum-active-time 缺省为 5 分钟, 其含义是一个线程持有一个连接的最长时间,而不管这个连接是否处于 active 状态, 并且如果线程的持有时间超过这个时间的之后会自动清除掉这个连接. 但是很多时候5分钟并不够用, 所以需要在配置文件中进行设置, 其单位为毫秒(ms).

你可能感兴趣的:(proxool)