We have been noticing that the minimum is not respected. Actually the "PoolWatchThread" always opens up a new connection when the available are 0. During debugging of that class and where there is NO OTHER db activity via our app, here is what we get: When the debugger has reached line 82 of PoolWatchThread.java we have:
if (maxNewConnections > 0
&& !this.pool.poolShuttingDown){
line 82 ---> fillConnections(Math.min(maxNewConnections, this.partition.getAcquireIncrement()));
// for the case where we have killed off all our connections due to network/db error
if (this.partition.getCreatedConnections() < this.partition.getMinConnections()){
fillConnections(this.partition.getMinConnections() - this.partition.getCreatedConnections() );
}
}
{code}
That means the "Math.min(maxNewConnections, this.partition.getAcquireIncrement())" gets to be 1, so an extra connection gets created for no reason and the setting minConnectionsPerPartition=0 never applies.
I believe that the behavior above should be okay if we had minConnectionsPerPartition=1 and not 0.
Hello,
We are currently using 0.8.0 with the following configuration:
bonecp. partitionCount= 1 minConnectionsP erPartition= 0 maxConnectionsP erPartition= 50 acquireIncremen t=1 connectionTimeo utInMs= 15000 idleMaxAgeInSec onds=180 idleConnectionT estPeriodInSeco nds=181 poolAvailabilit yThreshold= 0 disableConnecti onTracking= true
bonecp.
bonecp.
bonecp.
bonecp.
bonecp.
bonecp.
bonecp.
bonecp.
We have been noticing that the minimum is not respected. Actually the "PoolWatchThread" always opens up a new connection when the available are 0. During debugging of that class and where there is NO OTHER db activity via our app, here is what we get: When the debugger has reached line 82 of PoolWatchThread .java we have:
this.partition. getMaxConnectio ns() = 50 getCreatedConne ctions( ) = 0 getAvailableCon nections( ) = 0
this.partition.
this.partition.
maxNewConnections = 0
{code} ctions = this.partition. getMaxConnectio ns()-this. partition. getCreatedConne ctions( ); .getAvailableCo nnections( ) *100/this. partition. getMaxConnectio ns() > this.poolAvaila bilityThreshold )){ partition. setUnableToCrea teMoreTransacti ons(true) ;
maxNewConne
// loop for spurious interrupt
while (maxNewConnections == 0 || (this.partition
if (maxNewConnections == 0){
this.
}
this. partition. getPoolWatchThr eadSignalQueue( ).take( ); ections = this.partition. getMaxConnectio ns()-this. partition. getCreatedConne ctions( );
maxNewConn
}
if (maxNewConnections > 0 poolShuttingDow n){ (Math.min( maxNewConnectio ns, this.partition. getAcquireIncre ment()) ); .getCreatedConn ections( ) < this.partition. getMinConnectio ns()){ ctions( this.partition. getMinConnectio ns() - this.partition. getCreatedConne ctions( ) );
&& !this.pool.
line 82 ---> fillConnections
// for the case where we have killed off all our connections due to network/db error
if (this.partition
fillConne
}
}
{code}
That means the "Math.min( maxNewConnectio ns, this.partition. getAcquireIncre ment()) " gets to be 1, so an extra connection gets created for no reason and the setting minConnectionsP erPartition= 0 never applies.
I believe that the behavior above should be okay if we had minConnectionsP erPartition= 1 and not 0.
Is this a bug or are we missing something?