You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by pe...@kisstechnologies.co.uk on 2003/04/24 17:32:00 UTC
dbcp connections leaking and not being recovered
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