C3P0 apparent DEADLOCK

Source: Internet
Author: User

One, c3p0 execution after a period of time error such as the following

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!

Two, solutions such as the following


1, update c3p0 version number to 0.9.2.1 This version number optimizes the rules for getting connection

2, First change c3p0 configuration parameters

<!--the standard number of references for JDBC. Used to control the number of preparedstatements loaded in the data source. But because the pre-cached statements       belong to a single connection instead of the entire connection pool. So there are a number of factors that need to be taken into account in setting this parameter.       assuming that both maxstatements and maxstatementsperconnection are 0, the cache is closed.

default:0--> <property name= "maxstatements" value= "0"/><!--the time when the client calls getconnection () after the connection pool is exhausted and waits for the connection to be obtained. Units: milliseconds. The timeout will be thrown--<!--SQLEXCEPTION, assuming a setting of 0, then wait indefinitely. default:0--> <property name= "checkouttimeout" value= "[/>]"



C3P0 apparent DEADLOCK

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.