Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8800241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:32:03+00:00 2026-06-14T00:32:03+00:00

I am using C3p0 connection pool and I am observing following exception in my

  • 0

I am using C3p0 connection pool and I am observing following exception in my server.

 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@ed866f -- APPARENT DEADLOCK!!! Complete Status:
    Managed Threads: 1
    Active Threads: 1
    Active Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask@995ec2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
    Pending Tasks: 
            com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@11c3ceb
            com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@e392ed
            com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@c33853
            com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@a6f77d
            com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1c25bfc
            com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@12534a9
            com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@1a4564c
Pool thread stack traces:
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
                oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1338)
                com.mchange.v2.c3p0.impl.NewPooledConnection.cleanupUncachedStatements(NewPooledConnection.java:651)
                com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:539)
                com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:234)
                com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
                com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
               com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

My configuration is

<property name="initialPoolSize" value="1" />
    <property name="minPoolSize" value="1" />
    <property name="maxPoolSize" value="20" />
    <property name="maxIdleTime" value="240" />
    <property name="checkoutTimeout" value="60000" />
    <property name="acquireRetryAttempts" value="0" />
    <property name="acquireRetryDelay" value="1000" />
    <property name="debugUnreturnedConnectionStackTraces" value="true" />
    <property name="unreturnedConnectionTimeout" value="300" />
    <property name="numHelperThreads" value="1" />
    <property name="preferredTestQuery" value="SELECT 1 FROM DUAL" />

After some googing I found following threads.
https://forum.hibernate.org/viewtopic.php?t=947246

It is suggested to disable the statement caching to avoid this problem. But in my configuration I didn’t enable the statement caching(maxStatements, maxStatementsPerConnection are 0 by default).

Please suggest any alternatives.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:32:04+00:00Added an answer on June 14, 2026 at 12:32 am

    Don’t set numHelperThreads to 1.

    If you set numHelperThreads to 1, any slow task will trigger an APPARENT DEADLOCK. c3p0 relies on an internal Thread pool. One thread does not make a pool. Let numHelperThreads have at least its default value of 3.

    Specifically what is going on in your stack trace is that an attempt by the Connection pool to close() a Connection is taking long time, for some reason. There could be a real problem here, if this happens a lot, but it could just be an occasional slow operation, which a reasonably sized Thread pool would just handle and shrug off.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do anyone know a way to make: com.mchange.v2.c3p0.management.ManagementCoordinator=com.mchange.v2.c3p0.management.NullManagementCoordinator using Spring and not a c3p0.properties
I am unable to get a connection pool using c3p0 with Hibernate and Oracle.
Environment: Server : Jboss 4.2.3.GA We are using c3p0 0.9.1.2 for connection pooling. Whenever
I'm developping app using java, c3p0 for connection pooling and SQL Server 2005 for
I build j2ee application using spring, hibernage-JPA and c3p0 for connection pool. I have
I'm using Hibernate with C3P0 connection pool. In Hibernate 3 I could get access
I am using a C3P0 Connection Pool with Hibernate to execute some JDBC operations.
I'm running a Spring/Hibernate connecting to MySQL setup using c3p0 as my connection pool.
In my application I am using c3p0 for connection pooling. I provide the username
I am getting the following exception [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.