报错误:
APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
2010-12-03 21:14:07,453 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner] - Task com.mchange.v2.c3p0.stmt.GooGooStatementCache$1@2e0dcb (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
一般设置maxStatements=0解决该问题
但是:
把max_statements设置为0。
c3p0在同时关闭statement和connection的时候,或者关闭他们之间的时间很短的时候,有时候connection并没有被关闭,因为有些preparedstatement还在被cached住。这是c3p0的作者自己说的。
============================
set GLOBAL max_connections=500;
flush privileges;