A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool

79 Views Asked by At

we use c3p0 as connection pool

we have this error :

2023-10-25T12:55:34.162 [INFO] thread:[pool-9-thread-7 ] [ApplicationVersion:[83.0.4-4021] DiagnosticKey:[e4b904f6-a77c-4001-93ac-cf562153faf3] ReferenceCode:[] ClientMachine:[127.0.0.1] RemoteIp:[] RemotePort:[]] c.t.s.e.TransactionExecutorThreadingManager.run@53: New thread is created from : 5a62c616-df3f-4b9d-99b4-74a70edf5d49 , new thread info : pool-9-thread-7, 184

2023-10-25T12:55:34.174 [DEBUG] thread:[pool-9-thread-7 ] [ApplicationVersion:[83.0.4-4021] DiagnosticKey:[e4b904f6-a77c-4001-93ac-cf562153faf3] ReferenceCode:[] ClientMachine:[127.0.0.1] RemoteIp:[] RemotePort:[]] o.s.orm.jpa.JpaTransactionManager.getTransaction@366: Creating new transaction with name [ExternalTransaction]: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT

2023-10-25T12:55:36.482> [TRACE] thread:[pool-9-thread-7 ] [ApplicationVersion:[83.0.4-4021] DiagnosticKey:[e4b904f6-a77c-4001-93ac-cf562153faf3] ReferenceCode:[] ClientMachine:[127.0.0.1] RemoteIp:[] RemotePort:[]] c.m.v2.resourcepool.BasicResourcePool.log@187: trace com.mchange.v2.resourcepool.BasicResourcePool@227dcf [managed: 45, unused: 0, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@5cbc0787)

2023-10-25T12:55:41.551 [DEBUG] thread:[pool-9-thread-7 ] [ApplicationVersion:[83.0.4-4021] DiagnosticKey:[e4b904f6-a77c-4001-93ac-cf562153faf3] ReferenceCode:[] ClientMachine:[127.0.0.1] RemoteIp:[] RemotePort:[]] com.mchange.v2.sql.SqlUtils.log@198: Converting Throwable to SQLException... com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@227dcf -- timeout at awaitAvailable() at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1461) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:639) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:674) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:674) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:674) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:674) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:674) ...

It seems that the program try to get connection from pool but after 5 seconds (according to checkoutTimeout) time out. the pool has 45 busy connections more than 200 free connections .

0

There are 0 best solutions below