首页 > 代码库 > Proxool抛出的警告 was active for 365172 milliseconds and has been removed automaticaly

Proxool抛出的警告 was active for 365172 milliseconds and has been removed automaticaly

WARN cetDB:149 - #0005 was active for 365172 milliseconds and has been removed automaticaly. The Thread responsible was named ‘Thread-43‘, 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).

 

转自:http://www.baidu.com/link?url=_GF503cwy7FJtmQe-d6NxRIY56PbwuQb6lNGLNmytzs9cLf398PQzJFJb0_hqKGNCZwAW1V0-gMVM7rF8CO6rfyw-rfEzmp65tqr7Xpd0PC

Proxool抛出的警告 was active for 365172 milliseconds and has been removed automaticaly