commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Tomsic <>
Subject DBCP abandoned connections piling up, never clearing, reaching max_connections
Date Fri, 26 Mar 2004 01:14:52 GMT
Tomcat 4.1.30, MySql 4.0.18-standard, dbcp-1.1,mysql
jdbc 3.0.9

We're using mysql on a different box than the tomcat.
The problem we're having is, when we deploy to the box
using ant, and watch the mysql process list, 5-7
connections start immediately and stay "sleeping" for
ever.  Then, every time we make a connection to the DB
from within the application, it's not being cleaned
up.  So, new connections are made all the time, and
never cleaned up, not to mention that the initial 5 or
so that are started when the app is deployed stay
sleeping forever.  Within a brief period of heavy
activity, we have to stop everything, b/c we're out of

We have a class that handles the pool, w/ a private
instance constructor and the following:

DriverAdapterCPDS cpds = new DriverAdapterCPDS();
SharedPoolDataSource tds = new SharedPoolDataSource();
DataSource ds = tds;

Then there's a method that simply returns
ds.getConnection() from within that singleton pool
When we get a connection, it's wrapped in a
try/catch/finally where inside the finally we
conn.close() explicitly.

Sorry to be long, but anyone have any thoughts?

thanks in advance.

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

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

View raw message