Re: Database connections aren't being released...

2005-10-07 Thread Richard Road Runner

Hmm..  Thank you for the reply.  Yes we are using DBCP.

I discussed this with our team and we going to pursue this as a possible 
cause.


Thanks again!!


- Original Message - 
From: Darryl L. Miles [EMAIL PROTECTED]

To: Tomcat Users List tomcat-user@jakarta.apache.org
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 06, 2005 10:29 PM
Subject: Re: Database connections aren't being released...



Richard Road Runner wrote:

I am not sure that this is a Tomcat issue, but we are not sure what 
exactly is causing our problem.


We are running Tomcat 5.0.27.  We are using the most recent jconn2.jar 
driver to connect to a Sybase SQL Anywhere Studio 7 database via JDBC.


Over a period of time, the number of connections to the database continues 
to increase far beyond the possible number of users.  The only way to 
close the connections is to restart the database server.





Are you using DBCP ?

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.


--
Darryl L. Miles





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: Database connections aren't being released...

2005-10-06 Thread Richard Road Runner
I've confirmed that we added the parameter removeAbandoned=true to the 
Database resource in the server.xml about a year ago and it had no effect.
None of us think that we are not closing connecitons properlly.

Database connections aren't being released...

2005-10-05 Thread Richard Road Runner
I am not sure that this is a Tomcat issue, but we are not sure what exactly is 
causing our problem.

We are running Tomcat 5.0.27.  We are using the most recent jconn2.jar driver 
to connect to a Sybase SQL Anywhere Studio 7 database via JDBC.

Over a period of time, the number of connections to the database continues to 
increase far beyond the possible number of users.  The only way to close the 
connections is to restart the database server.

Again, we are not sure if we should be looking at Tomcat, the JDBC driver, or 
Sybase to solve this problem.

Any input would be helpful.

Thanks