commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: dbcp connections leaking and not being recovered
Date Thu, 24 Apr 2003 16:20:43 GMT
Yup I am trying to do this, however I cant trace where the leaks are 
coming from (and some of them are caused because I get a SQLException in 
the middle of a page and then it never runs the cleanUp stuff.
Hmm, will just have to rewrite a load of stuff :(

Still doesnt answer however, why the DBCP does not recover abandonded 
connections after 30 seconds as I have specified in my server.xml?


"Prathap Guptha" <>
24/04/2003 16:55
Please respond to "Jakarta Commons Users List"
        Subject:        Re: dbcp connections leaking and not being 


I observe the same problem, whenver connections are not properly closed on 

exception blcoks, When I fixed those that is by closing the Connections 
always in finally blocks, I was able to run successfully,

Have try with exception scenarios,


>Reply-To: "Jakarta Commons Users List" <>
>Subject: dbcp connections leaking and not being recovered
>Date: Thu, 24 Apr 2003 16:32:00 +0100
>Im using the DBCP in Tomcat to provide me with a central source of
>DataSource objects via JNDI.  I am having problem with connections 
>and it running out of available connections (my driver only allows 20),
>and although I have the various options to recover connections turned on,
>they do not seem to work properly.  Previously, I have had this working,
>but recently it has not caught these connections.  My server.xml has this
>in it:
><Resource auth="Container" name="jdbc/myGlobalDataSource"
><ResourceParams name="jdbc/myGlobalDataSource">
>         <!--
>         <parameter>
>                 <name>validationQuery</name>
>                 <value>select top 1 * from policy_lines</value>
>         </parameter>
>         -->
>         <parameter>
>                 <name>maxWait</name>
>                 <value>5000</value>
>         </parameter>
>         <parameter>
>                 <name>maxActive</name>
>                 <value>20</value>
>         </parameter>
>         <parameter>
>                 <name>name</name>
>                 <value>myname</value>
>         </parameter>
>         <parameter>
>                 <name>url</name>
>  <value>jdbc:inetdae7:kisssqldev2:1433?database=mydb</value>
>         </parameter>
>         <parameter>
>                 <name>driverClassName</name>
>                 <value>com.inet.tds.TdsDriver</value>
>         </parameter>
>         <parameter>
>                 <name>maxIdle</name>
>                 <value>4</value>
>         </parameter>
>         <parameter>
>                 <name>username</name>
>                 <value>un</value>
>         </parameter>
>         <parameter>
>                 <name>password</name>
>                 <value>pw</value>
>         </parameter>
>         <parameter>
>                 <name>removeAbandoned</name>
>                 <value>true</value>
>         </parameter>
>         <parameter>
>                 <name>removeAbandonedTimeout</name>
>                 <value>30</value>
>         </parameter>
>         <parameter>
>                 <name>logAbandoned</name>
>                 <value>true</value>
>         </parameter>
>But they dont come out! Arghh - im tearing my hair out as it keeps
>happening and any time there is an error we get lose a connection and in
>the end the site crashes.  This is happening on a newly live environment
>and its really annoying me cos its very hard to trace!
>Kiss Technologies
>Please note, we have moved!
>4, Percy Street
>W1T 1DF
>New permanent phone numbers:
>Phone 020 7692 9922
>Fax 020 7692 9923

Find old batchmates. Renew lost friendship. Right here!

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message