commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [dbcp]the activity when number of active connections reach (maxActive-minIdle)
Date Sun, 10 Jan 2016 19:49:18 GMT
On Fri, Jan 8, 2016 at 10:27 PM, sum2000 <> wrote:

> for example,pool size:
> db.pool.size.init=5
> db.pool.size.idle.max=20
> db.pool.size.idle.min=10
> when # of active connections reach 10, what's the following activity of
> dbcp?
> We know it can’t create new one for idle due to no availabe pool resource,
> if true dbcp can’t keep minIdle for 10, so what's next happen?

The maxTotal [1] property is a hard limit on the total number of
connections that can be open under management by the pool at a given time
(checked out or idle).  The minIdle property really expresses an objective,
not a guarantee.  In the situation you describe, the number of idle
connections will drop down below minIdle.

Another thing to note is that as of version 2.1 of DBCP, as indicated in
the javadoc for minIdle, the pool only attempts to ensure minIdle when the
evictor runs, so unless you have timeBetweenEvictionRunsMillis set to a
positive value, there will be no attempt by the pool to ensure minIdle.


[1] In DBCP 1.x, this property is named "maxActive".

> Thank you.
> Yong Fu

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