Hi,

i tested CONNECTORS-1202 (stale connection check) and i encounter a dead lock 
in the connection pool when i simulate a database outage. 

I use ManifoldCF 1.7.1 with CONNECOTRS-1202 patch applied an MySQL as Database.

Steps for reproduction :

1. Start ManifoldCF with a limited ConnectionPool Max size of 5
2. When everything is running stop the database
3. Wait for connection exeptions to occur
4. Click around in the ui to start more threads that want to aquire a connection
5. Everything freezes 
6. Start the database
7. Still everything is freezed. no recovery is happening.

As far as i understand the ConnectionPool implementation, the problem is that 
the activeConnections counter is not decremented when the DriverManager fails 
to get a Connection. On every failed DriverManager.getConnection call the pool 
gets more and more 'exhausted'. When activeConnections hits the size limit, 
threads go to Object.wait(). But notifyAll will never be called because there 
is no outstanding connection to return.

Regards,
Markus

Reply via email to