Robin Allen - 2017-09-29

I found this report because I'm faced with exactly the same thing as reported here.

After DB or network outage, c3p0 does not always recover.

'sampleLastAcquisitionFailureStackTrace' shows that acquire has failed due to "IO exception End of TNS data channel"

CPU usage on the machine hits 100%, all from c3p0.

Any attempt to get a new connection fails with ... "Caused by remote: java.lang.RuntimeException: org.hibernate.exception.GenericJDBCException: Cannot open connection"
.... "Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool cannot acquire a new resource -- the factory or source appears to be down."
Exactly as in this report.

The DB is up, and working fine. (Other identical nodes running same modules are using it just fine)

My pool has min 2, and those 2 existing connections are still working. But anything trying to make a 3rd connection fails.

'Soft Reset' jmx operation drops the 2 existing connections. Then ANY code trying to get a connection sees the same 'Cannot open connection' error.

'Hard Reset' jmx operation fixes everything immediately. CPU usage drops to zero. New DB connections get created. Everything returns to normal..... proving that C3P0's management of the pool is at fault.