commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Lindahl" <ben.lind...@appiancorp.com>
Subject Negative value for numActive under high load
Date Mon, 18 Apr 2005 20:08:54 GMT
I have an application that uses GenericObjectPool in Commons Pool.
Under relatively high loads (perhaps 10-20 borrowed objects per second),
one of the pools is returning a negative number of active connections
when getNumActive is called.  Overall, a report on the pool shows the
following numbers:

Active/Max Active   -6/10

Idle/Max Idle       10/10

Created/Destroyed   24/20

 

The last value is one that we are tracking ourselves by implementing
connectionCreated() and connectionDestroyed().

 

Besides the negative numActive, it is also strange that 20 connections
are destroyed, even though maxIdle is set to the same thing as maxActive
(so no more than 10 connections should be created, and therefore none
should ever have to be destroyed).  When maxIdle==-1, the number of
connections created is also greater than 10, but the number of
connections destroyed is 0 and numActive is 0.  An interesting point
about these numbers is that numActive+numIdle+numDestroyed==numCreated.
This fact still holds true even though there are a negative number of
active connections.

 

I have tried searching bug reports on this, but was unable to come up
with anything.  I am hoping that it is an implementation issue on our
side, so that we can fix it quickly.

 

Thanks in advance.

 

Ben Lindahl

 


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