I have a problem in our problem in our production environment (Tomcat 5.5.26) that I am able to replicate in a development environment (Tomcat 6.0.20) . I¹m using the apache DBCP package inside my web application, so Tomcat is not managing it.
Commons-dbcp-1.2.2.jar Commons-pool-1.5.4.jar connectionPool.setMaxWait(20000); connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK ); The connection pool has 8 connections by default and is the maximum allowed. When I click a link that causes a read from the database, everything is fine. However, if I click that link 15 times or so, one right after the other, I eventually get some successful responses as well as some failures, and my finally block shows every connection that was opened being closed. However, connectionPool.getNumActive() will then show that anywhere from 2 to 5 connections are still considered active, even though this is running on my desktop machine and no one else is hitting the app. And those connections are never recovered. The only reason I'm wondering if this is a tomcat issue is that I can set the whenExhaustedAction to WHEN_EXHAUSTED_FAIL, and it will fail immediately after the first 6 clicks (don't ask my why 6 instead of 8. Don't know). However, anywhere from 2 to 5 connections will still end up being considered active when they are not, and they are never recovered. Why would connections that are being closed still be considered active by the connection pool? This only seems to happen when there is a heavy load on the server with more database connection requests than there are connections available. I'm also posting this on the commons mailing list. Thanks for any help. --Michael --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org