commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Road Runner" <rjadr...@nc.rr.com>
Subject DBCP connection pooling issue?
Date Fri, 07 Oct 2005 23:20:56 GMT
I am posting this issue on Sybase, commons and Tomcat newsgroups.  We are not sure right now
which is responsible for our issue.

For a number of years now, we have been running into problems with the number of database
connections growing unexpectedly.

We are running a 150 GB Sybase ASA 7 database..

We have a Java application running on Tomcat that uses commons DBCP.

Over time, the number of database connections increases and the database server eventually
starts refusing connections.  We then need to restart the database server.

We have already explored the possiblity that we weren't closing connections properrly, however
this does not appear to be the issue.  

Another person blamed it on DBCP.  Below are two opinions.  One from this individual and the
second from my supervisor.

"I have an issue with 5.5.9 and DBCP shipped with it I found 2 weeks 
ago.  I would describe my problem as DBCP is not "reusing database 
connections when it should" but it instead creates a new one, until the 
SQL server has too many connections (or your DBCP hits upper parameter 
limits).

With TC and MySQL I can confirm this by logging my database handle close 
and watching what happens with "SHOW PROCESSLIST" sql command on the 
server.   Each request needs 1 database connection and the logging 
should confirm it returns (releases) the connection back to DBCP pool.  
I have followed this path with the debugger and got inside DBCP to prove 
the release takes place.

I had put down the problem and just configured up my DBCP parameters to 
expire old connections as fast as possible and up the maximum limits.  
This wont work for me in production, maybe I switch to C3P0 connection 
pooling at that time.

Its just so difficult to help out and nail the problem with TCs 
refactored and repackaged DBCP, I would very much appreciate an SDK 
version of the full TC package that includes all source in the JARs.  I 
am doing a CVS build.xml now, but I think this will be for 5.5.12, I 
just need to work out how to fix the version for a 5.5.9 release and 
compare the two trees to maybe try and nail this one, or at least 
confirm the blame here is with DBCP.
"

Below is my supervisor's opionion.  

"
Having JDBC work with an ASA database means enabling "java" in the database, and the database
installs an (old) JRE on the server and presumably enables Java extensions from the sybase
engine. There are patches at Sybase that upgrade the Sybase engine, but I bet the Java extensions
lag behind the database upgrades. In addition, when you upgrade the JConnect driver in ORview,
as I did fromJconnect 4.5 -> 5 ->5.5, the new functionality in JConnect needs associated
new functionality in the Sybase java extensions on the server in order to work fully. There
are patches for serverside JConnect that I coulddn't install. The lag behing the JConnect
on the client side and the Java extensions of our ASA server is my bet on the reason for our
accumulating connections."

Any feedback would be helpfull
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message