java.sql.sqlexception:an attempt by a-client to checkout a Connection has-timed out. At Com.mchange.v2.sql.SqlUtils.toSQLException (sqlutils.java:106) at Com.mchange.v2.sql.SqlUtils.toSQLException ( SQLUTILS.JAVA:65) at Com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection ( c3p0pooledconnectionpool.java:527) at Com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection ( abstractpoolbackeddatasource.java:128)
caused BY:COM.MCHANGE.V2.RESOURCEPOOL.TIMEOUTEXCEPTION:A client timed out while waiting to acquire A resource from COM.M change.v2.resourcepool.basicresourcepool@a0e5175-Timeout at awaitavailable () at Com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable (basicresourcepool.java:1317) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:557) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource (basicresourcepool.java:590) at Com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource (basicresourcepool.java:477) at
Com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection (c3p0pooledconnectionpool.java:525) ... 7 more
Workaround: Cache shutdown is the c3p0.max_statements set to 0 (if not set to 0, can cause connection can not really be closed), so there will be no cached PreparedStatement, and the set of C3p0.idle_ Test_period is less than c3p0.timeout, this setting should solve the problem.