commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Molloy <>
Subject DBCP and Pooling--Connections getting lost under load
Date Thu, 04 Feb 2010 01:05:46 GMT
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.



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

Thanks for any help.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message