Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Connection pool exhausted

Chakravarthy, Sundar

2004-01-09


Did you check the logs for abandoned ones? I was able to successfully
trace unclosed Oracle connections with the help of db-commons auto
logging feature. But first you have to make sure all your API is using
jdbc/theDB resource to open connections.


-----Original Message-----
From: Allistair Crossley [mailto:Allistair.Crossley@(protected)]
Sent: Friday, January 09, 2004 12:33 PM
To: TOMCAT USER (E-mail)
Subject: Connection pool exhausted

Hi All,

My tomcat is chucking a connection pool exhausted at me after about 15
minutes of operations on my web application.

Here is my resource;

 <Resource name="jdbc/theDB" auth="Container"
type="javax.sql.DataSource"/>

 <ResourceParams name="jdbc/theDB">        
  <parameter>        
   <name>factory</name>        
   <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>

  </parameter>        
   <parameter>        
    <name>driverClassName</name>        
    <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>

   </parameter>        
   <parameter>        
    <name>url</name>        
    <value>jdbc:microsoft:sqlserver://server:1433</value>

   </parameter>        
   <parameter>        
  <name>username</name>        
  <value>sa</value>      
    </parameter>        
    <parameter>        
  <name>password</name>        
  <value>password</value>        
    </parameter>        
    <parameter>        
  <name>maxActive</name>        
  <value>50</value>        
    </parameter>        
    <parameter>        
    <name>maxIdle</name>        
    <value>10</value>        
    </parameter>        
    <parameter>        
    <name>maxWait</name>        
    <value>10000</value>        
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>SELECT 1 + 1</value>
    </parameter>
<parameter><name>logAbandoned</name><value>true</value></parameter>
<parameter><name>removeAbandoned</name><value>true</value></parameter>

</ResourceParams>

I have checked that all my code have finally blocks to close result
sets, connections and statements.

I have also checked my SQL server monitors and it shows the connections
are all idle.

Any starter tips on this problem?

Cheers, ADC


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.