C3P0错误APPARENT DEADLOCK!!!解决
来源:互联网 发布:淘宝客站内违规推广 编辑:程序博客网 时间:2024/06/05 03:35
在使用C3P0的过程中出现了好多错误.最长见就是死锁,占用资源比较大.
对于死锁问题http://japi.javaeye.com/blog/243702.找到了解决方案(不能完全保证,但在负载测试中,还没有出现问题)
问题关键是参数的设置
引用
<!--JDBC的标准参数,用以控制数据源内加载的PreparedStatements数量。但由于预缓存的statements
属于单个connection而不是整个连接池。所以设置这个参数需要考虑到多方面的因素。
如果maxStatements与maxStatementsPerConnection均为0,则缓存被关闭。Default: 0-->
<property name="maxStatements">100</property>
<!--maxStatementsPerConnection定义了连接池内单个连接所拥有的最大缓存statements数。Default: 0 -->
<property name="maxStatementsPerConnection"></property>
解决的方法是:
引用
In hibernate.cfg.xml:
<property name="hibernate.c3p0.max_statements">0</property>
In c3p0.properties:
c3p0.maxStatements=0
c3p0.maxStatementsPerConnection=100
来源于:http://forum.hibernate.org/viewtopic.php?p=2386237
http://forum.hibernate.org/viewtopic.php?t=947246&start=0&postdays=0&postorder=asc&highlight=apparent+deadlock+c3p0&sid=6fcfab70cff3588bf010914df8dbbb90
http://www.mchange.com/projects/c3p0/index.html#c3p0_properties
- C3P0错误APPARENT DEADLOCK!!!解决
- C3P0错误APPARENT DEADLOCK!!!解决
- 项目启动c3p0 APPARENT DEADLOCK!!! 错误
- c3p0-APPARENT DEADLOCK
- C3P0 APPARENT DEADLOCK
- c3p0 报 APPARENT DEADLOCK!!!
- c3p0 APPARENT DEADLOCK问题
- c3p0 -- APPARENT DEADLOCK!!问题
- C3P0连接池启动时 APPARENT DEADLOCK!!! 错误
- c3p0 报错APPARENT DEADLOCK!!!
- 【解决方案】c3p0 APPARENT DEADLOCK创建紧急线程
- 解决 APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tas
- APPARENT DEADLOCK!!![proxool+Spring集成]
- 使用C3P0-0.9.1.jar包的问题:APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
- 使用C3P0-0.9.1.jar包的问题:APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
- 关于oracle的那些坑(c3p0连接池死锁 APPARENT DEADLOCK,druid没有反应,然后pl/sql登陆很慢,之后正常)
- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks
- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks
- 如何显示右键菜单?
- EntityConnection ConnectionString (不同model使用相同的连接字符串)
- 什么情况下应该建立索引,索引优化及分析
- 解决ubuntu-9.10中flash乱码的问题 - Aland·Sun
- Mysql Error #2002: Can't connect to local
- C3P0错误APPARENT DEADLOCK!!!解决
- SRM 465(DIV1 DIV2)
- 再议WS_CLIPSIBLINGS
- MySQL表类型简单对比
- mysql_query("SET character_set_results=UTF8",$conn);
- vs2010 ultimate和Team Foundation Server 2010下载地址
- VS2010正式旗舰版ISO下载地址和安装要求
- 如何紧急恢复受损的Windows系统
- GCC G++ C C++的区别