One, c3p0 run a period of time after the error is as follows
W 07-26_00:58:27 Threadpoolasynchronousrunner.java 608 com[email protected]70929ab6--APPARENT DEADLOCK!!! Creating Emergency threads for unassigned pending tasks! W 07-26_00:58:39 Threadpoolasynchronousrunner.java 608 com[email protected]4496b93a--APPARENT DEADLOCK!!! Creating Emergency threads for unassigned pending tasks!
Second, the solution is as follows
1, update c3p0 version to 0.9.2.1 This version optimizes the rules for getting connection
2, first Modify the C3P0 configuration parameters
<!--the standard parameters of JDBC to control the number of preparedstatements loaded within the data source. However, because the pre-cached statements belong to a single connection instead of the entire connection pool. So setting this parameter takes into account a variety of factors. if both maxstatements and maxstatementsperconnection are 0, the cache is closed. default:0--> <property name= "maxstatements" value= "0"/><!--when the client calls getconnection () after the connection pool is exhausted, in milliseconds. Timeout will be thrown--<!--SQLEXCEPTION, if set 0, then infinite wait. default:0--> <property name= "checkouttimeout" value= "[/>]"