mysql - C3p0 APPARENT DEADLOCK exception -
i keep getting exception in tomcat log:
com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector run warning: com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector@76b28200 -- apparent deadlock!!! creating emergency threads unassigned pending tasks! com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector run warning: com.mchange.v2.async.threadpoolasynchronousrunner$deadlockdetector@76b28200 -- apparent deadlock!!! complete status: managed threads: 3 active threads: 3 active tasks: com.mchange.v2.resourcepool.basicresourcepool$acquiretask@1201fd18 (com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#1) com.mchange.v2.resourcepool.basicresourcepool$acquiretask@408f3be4 (com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#0) com.mchange.v2.resourcepool.basicresourcepool$acquiretask@7ba516d8 (com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#2) pending tasks: com.mchange.v2.resourcepool.basicresourcepool$acquiretask@137efe53 com.mchange.v2.resourcepool.basicresourcepool$acquiretask@766b0524 pool thread stack traces: thread[com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#1,5,main] java.lang.thread.sleep(native method) com.mchange.v2.resourcepool.basicresourcepool$acquiretask.run(basicresourcepool.java:1805) com.mchange.v2.async.threadpoolasynchronousrunner$poolthread.run(threadpoolasynchronousrunner.java:547) thread[com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#0,5,main] java.lang.thread.sleep(native method) com.mchange.v2.resourcepool.basicresourcepool$acquiretask.run(basicresourcepool.java:1805) com.mchange.v2.async.threadpoolasynchronousrunner$poolthread.run(threadpoolasynchronousrunner.java:547) thread[com.mchange.v2.async.threadpoolasynchronousrunner$poolthread-#2,5,main] java.lang.thread.sleep(native method) com.mchange.v2.resourcepool.basicresourcepool$acquiretask.run(basicresourcepool.java:1805) com.mchange.v2.async.threadpoolasynchronousrunner$poolthread.run(threadpoolasynchronousrunner.java:547)
i using hibernate 3.6.2 , c3p0 0.9.1.2 mysql. after couple of hours of searching google, apparent deadlock exception seems associated prepared statement caching. c3p0 configuration in hibernate.cfg.xml:
<propertyname="connection.provider_class">org.hibernate.connection.c3p0connectionprovider</property> <property name="hibernate.c3p0.acquire_increment">5</property> <property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.max_size">60</property> <property name="hibernate.c3p0.idle_test_period">120</property> <property name="hibernate.c3p0.timeout">180</property> <property name="hibernate.c3p0.max_statements">0</property>
i not doing statement caching whatsoever. hints of wrong here appreciated.
the tasks dealocking connection acquisition tasks. is, c3p0 trying acquire new connections database, , connection acquisition attempts taking long time.
the first thing upgrade 0.9.2.1, has improved means of performing round of connection acquisitions in situations acquisition attempts fail.
if doesn't solve problem, you'll need figure out why c3p0's attempts acquire connection hanging long periods of time: neither succeeding nor failing exception.
Comments
Post a Comment