Hello Steve
I have a bad news. Your suggestion is not solve my problem. I't fail more frequent. My last configuration take 1 week to fail (make caller wait forever but yours break at once). There are configuration as you recommended. I'm using hostforweb hosting service (
www.hostforweb.com). I do not know why.
In /c3p0.properties
c3p0.acquireRetryDelay=1000
c3p0.acquireRetryAttempts=20
c3p0.breakAfterAcquireFailure=false
In /hibernate-cfg.xml
...
<property name="connection.provider_class">net.sf.hibernate.connection.C3P0ConnectionProvider</property>
...
<!-- connection pool -->
<property name="c3p0.minPoolSize">5</property>
<property name="c3p0.maxPoolSize">40</property>
<property name="c3p0.maxIdleTime">20</property>
<property name="c3p0.maxStatements">0</property>
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.testConnectionOnCheckout">true</property>
<property name="c3p0.idleConnectionTestPeriod">1800</property>
...