commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pete.sto...@kisstechnologies.co.uk
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?

Pete





"Prathap Guptha" <tomcatrnd@hotmail.com>
24/04/2003 16:55
Please respond to "Jakarta Commons Users List"
 
        To:     commons-user@jakarta.apache.org
        cc: 
        Subject:        Re: dbcp connections leaking and not being 
recovered




Hi,

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,

Regards,
Pratt.




>From: pete.storey@kisstechnologies.co.uk
>Reply-To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>To: commons-user@jakarta.apache.org
>Subject: dbcp connections leaking and not being recovered
>Date: Thu, 24 Apr 2003 16:32:00 +0100
>
>Hi
>Im using the DBCP in Tomcat to provide me with a central source of
>DataSource objects via JNDI.  I am having problem with connections 
leaking
>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"
>type="javax.sql.DataSource"/>
><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>
></ResourceParams>
>
>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!
>
>Pete
>
>Kiss Technologies
>
>http://www.kisstechnologies.co.uk/
>
>Please note, we have moved!
>
>4, Percy Street
>London
>W1T 1DF
>
>New permanent phone numbers:
>
>Phone 020 7692 9922
>Fax 020 7692 9923


_________________________________________________________________
Find old batchmates. Renew lost friendship. 
http://www.batchmates.com/msn.asp Right here!


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



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