proxool You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason 不指定

lanbingfeihan , 2011/12/09 11:28 , j2ee , 评论(0) , 阅读(7102) , Via 本站原创 | |
一个比较慢的页面访问不了:

tomcat报错:

[framework] 10:31:39 - ERROR org.hibernate.transaction.JDBCTransaction  - Could not toggle autocommit
java.sql.SQLException: Couldn't perform the operation setAutoCommit: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs).

应该是由于访问量变大,sql语句中原先有使用in子查询,造成访问速度变慢,超过proxool连接池配置的连接保持时间后,连接池将关闭连接对象,所以就close了。解决办法是给表中加索引。尽量不使用In子查询。
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]