C3p0 appears a attempt by a client to checkout a Connection has timed out

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.