0

We ran an java web application server with weblogic10.3+bea jdk1.6+hibernate3+c3p0 0.9.1.2+oracle 9.2.8. When we upgraded the database to oracle11gx64 cluster with ojdbc6, we met many errors.

First the following error message appeared and the application can't connect to database at intervals of hours:

 *com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@2a01aa -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2016-01-28 18:09:55 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@2a01aa -- APPARENT DEADLOCK!!! Complete Status: 
    Managed Threads: 3
    Active Threads: 3
    Active Tasks:*

Then we changed the config "hibernate.c3p0.max_statements"=0,this error disappeared,BUT other OutOfMemoryError arose:

Caused by: javassist.CannotCompileException: by java.lang.OutOfMemoryError: class allocation, 188463944 loaded, 187957248 footprint JVM@check_alloc (src/jvm/model/classload/classalloc.c:118). 67744 bytes at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:169) at org.jboss.seam.util.ProxyFactory.createClass3(ProxyFactory.java:350) ... 77 more Caused by: java.lang.OutOfMemoryError: class allocation, 188463944 loaded, 187957248 footprint JVM@check_alloc (src/jvm/model/classload/classalloc.c:118). 67744 bytes

Anyone could help me? Thanks in advance!

1 Answers1

0

Update to the latest c3p0 (now 0.9.5.2).

Continue to use statement caching if that works for you, but to avoid the deadlocks, use the following setting.

c3p0.statementCacheNumDeferredCloseThreads=1

See the docs.

Steve Waldman
  • 13,689
  • 1
  • 35
  • 45