We were having some troubles with our enterprise server app leaving connections opened on DB. We solved it, but what we noticed next is that helper threads are also leaving connection opened to database. Is this the way it should work or it should be killed after timeout period defined? What is recommended number of helperthreads? It looks to me like we have to many helper threads defined. This is our current configuration: <property name="hibernate.c3p0.min_size">10</property> <property name="hibernate.c3p0.max_size">750</property> <property name="hibernate.c3p0.max_statements">0</property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">180</property> <property name="hibernate.c3p0.timeout">14400</property> <property name="hibernate.c3p0.numHelperThreads">500</property> <property name="hibernate.c3p0.maxAdministrativeTaskTime">1</property>
For test purposes we are setting this to check what connections are left open: <property name="hibernate.c3p0.unreturnedConnectionTimeout">86400</property> <property name="hibernate.c3p0.debugUnreturnedConnectionStackTraces">true</property>
And this is what was returned from that: WARNING [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (C3P0PooledConnectionPoolManager[identityToken->31sxr39b1qehv8i1bbvdzt|4363ca12]-AdminTaskTimer) A task has exceeded the maximum allowable task time. Will interrupt() thread [Thread[C3P0PooledConnectionPoolManager[identityToken->31sxr39b1qehv8i1bbvdzt|4363ca12]-HelperThread-#91,5,ServerService ThreadGroup]], with current task: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@7996bbf2 WARNING [com.mchange.v2.async.ThreadPoolAsynchronousRunner] (C3P0PooledConnectionPoolManager[identityToken->31sxr39b1qehv8i1bbvdzt|4363ca12]-AdminTaskTimer) Thread [Thread[C3P0PooledConnectionPoolManager[identityToken->31sxr39b1qehv8i1bbvdzt|4363ca12]-HelperThread-#91,5,ServerService ThreadGroup]] interrupted
|