I'm running c3p0 under hibernate under tomcat and mysql db, on a very heavily loaded system, and suspect c3p0 is stealing tomcat's worker threads into infinite loops. I suspect this is the case, since:
1. Tomcat runs out of worker threads.
2. c3p0 fills the log with an infinite number of the following messages, all from the same thread, in very close proximity (hundreds per millisecond!), apparently indefinitely:
1050002 [TP-Processor1721] 06/03/19-10:20:14,014 DEBUG com.mchange.v2.c3p0.stmt.GooGooStatementCache - checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 100; checked out: 1; num connections: 33; num keys: 100
1050002 [TP-Processor1721] 06/03/19-10:20:14,014 DEBUG com.mchange.v2.c3p0.stmt.GooGooStatementCache - com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache ----> CACHE HIT
1050002 [TP-Processor1721] 06/03/19-10:20:14,014 DEBUG com.mchange.v2.c3p0.stmt.GooGooStatementCache - checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 100; checked out: 2; num connections: 33; num keys: 100
...
Even if this logging loop is finite, I suspect its very unhealthy and certainly not optimal.
Any ideas anybody for what causes this and how it can be fixed?
p.s. Can anybody recommend a more documented, production level alternative to c3p0?
|