You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Daniel Perez <dp...@fib.upc.es> on 2004/05/13 10:16:38 UTC

[dbcp] Pool goes crazy

Hi,

I've been successfuly using dbcp as connection pool for a year more or 
less, on Solaris, JDK 1.4.2 and Tomcat 4.x, against an Oracle 8i database.

Some weeks ago, since we changed to Tomcat 5.x,  we've experienced only 
a pair of times a weird behaviour: the pool of connections  becomes 
bigger and bigger until Oracle connections (150) are exhausted. We have 
between 30 and 50 connections (20 from pool, the others are dedicated 
connections), so achieve the 150 limit is impossible under normal 
conditions. It seems like the pool asks for more connections... Below 
you can see my config (I've avoided user, password and url params).

<ResourceParams name="jdbc/racoPool">
  <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
  </parameter>
  <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
  </parameter>
  <parameter>
    <name>maxActive</name>
    <value>20</value>
  </parameter>
  <parameter>
    <value>1</value>ame>
  </parameter>
  <parameter>
    <name>maxWait</name>
    <value>5000</value>
  </parameter>
  <parameter>
    <name>removeAbandoned</name>
    <value>true</value>
  </parameter>
  <parameter>
    <name>removeAbandonedTimeout</name>
    <value>60</value>
  </parameter>
  <parameter>
    <name>validationQuery</name>
    <value>select count(1) from dual</value>
  </parameter>
  <parameter>
    <name>logAbandoned</name>
    <value>false</value>
  </parameter>

Have someone else experienced this behaviour? Thanks in advance,


Dani P.


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


Re: [dbcp] Pool goes crazy

Posted by Daniel Perez <dp...@fib.upc.es>.
Thank you!

I'll try upgrading to a nightly build.

Dani P.

Dirk Verbeeck wrote:

> We recently found a bug in the removeAbandoned feature, if connections 
> are removed as abandoned during high load the active count becomes 
> incorrect.
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28579
>
> I recommend to disable the removeAbandoned or upgrading to a nightly 
> build.
>
> -- Dirk
>
> Daniel Perez wrote:
>
>> Hi,
>>
>> I've been successfuly using dbcp as connection pool for a year more 
>> or less, on Solaris, JDK 1.4.2 and Tomcat 4.x, against an Oracle 8i 
>> database.
>>
>> Some weeks ago, since we changed to Tomcat 5.x,  we've experienced 
>> only a pair of times a weird behaviour: the pool of connections  
>> becomes bigger and bigger until Oracle connections (150) are 
>> exhausted. We have between 30 and 50 connections (20 from pool, the 
>> others are dedicated connections), so achieve the 150 limit is 
>> impossible under normal conditions. It seems like the pool asks for 
>> more connections... Below you can see my config (I've avoided user, 
>> password and url params).
>>
>> <ResourceParams name="jdbc/racoPool">
>>  <parameter>
>>    <name>driverClassName</name>
>>    <value>oracle.jdbc.driver.OracleDriver</value>
>>  </parameter>
>>  <parameter>
>>    <name>factory</name>
>>    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>  </parameter>
>>  <parameter>
>>    <name>maxActive</name>
>>    <value>20</value>
>>  </parameter>
>>  <parameter>
>>    <value>1</value>ame>
>>  </parameter>
>>  <parameter>
>>    <name>maxWait</name>
>>    <value>5000</value>
>>  </parameter>
>>  <parameter>
>>    <name>removeAbandoned</name>
>>    <value>true</value>
>>  </parameter>
>>  <parameter>
>>    <name>removeAbandonedTimeout</name>
>>    <value>60</value>
>>  </parameter>
>>  <parameter>
>>    <name>validationQuery</name>
>>    <value>select count(1) from dual</value>
>>  </parameter>
>>  <parameter>
>>    <name>logAbandoned</name>
>>    <value>false</value>
>>  </parameter>
>>
>> Have someone else experienced this behaviour? Thanks in advance,
>>
>>
>> Dani P.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


-- 

Re: [dbcp] Pool goes crazy

Posted by Dirk Verbeeck <di...@pandora.be>.
We recently found a bug in the removeAbandoned feature, if connections 
are removed as abandoned during high load the active count becomes 
incorrect.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28579

I recommend to disable the removeAbandoned or upgrading to a nightly 
build.

-- Dirk

Daniel Perez wrote:

> Hi,
> 
> I've been successfuly using dbcp as connection pool for a year more or 
> less, on Solaris, JDK 1.4.2 and Tomcat 4.x, against an Oracle 8i database.
> 
> Some weeks ago, since we changed to Tomcat 5.x,  we've experienced only 
> a pair of times a weird behaviour: the pool of connections  becomes 
> bigger and bigger until Oracle connections (150) are exhausted. We have 
> between 30 and 50 connections (20 from pool, the others are dedicated 
> connections), so achieve the 150 limit is impossible under normal 
> conditions. It seems like the pool asks for more connections... Below 
> you can see my config (I've avoided user, password and url params).
> 
> <ResourceParams name="jdbc/racoPool">
>  <parameter>
>    <name>driverClassName</name>
>    <value>oracle.jdbc.driver.OracleDriver</value>
>  </parameter>
>  <parameter>
>    <name>factory</name>
>    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>  </parameter>
>  <parameter>
>    <name>maxActive</name>
>    <value>20</value>
>  </parameter>
>  <parameter>
>    <value>1</value>ame>
>  </parameter>
>  <parameter>
>    <name>maxWait</name>
>    <value>5000</value>
>  </parameter>
>  <parameter>
>    <name>removeAbandoned</name>
>    <value>true</value>
>  </parameter>
>  <parameter>
>    <name>removeAbandonedTimeout</name>
>    <value>60</value>
>  </parameter>
>  <parameter>
>    <name>validationQuery</name>
>    <value>select count(1) from dual</value>
>  </parameter>
>  <parameter>
>    <name>logAbandoned</name>
>    <value>false</value>
>  </parameter>
> 
> Have someone else experienced this behaviour? Thanks in advance,
> 
> 
> Dani P.




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