C3P0错误APPARENT DEADLOCK!!!解决

转载自:http://japi.iteye.com/blog/254786 


感谢原作者

在使用C3P0的过程中出现了好多错误.最长见就是死锁,占用资源比较大. 

对于死锁问题http://japi.iteye.com/blog/243702.找到了解决方案(不能完全保证,但在负载测试中,还没有出现问题) 

问题关键是参数的设置 
引用

 
100 

 
 


解决的方法是: 
引用
In hibernate.cfg.xml: 
0  


In c3p0.properties: 
c3p0.maxStatements=0 
c3p0.maxStatementsPerConnection=100 
 

你可能感兴趣的:(运维,数据库)