Skip to main content

Connection Pool monitoring data - spooky math?

No replies
Joined: 2007-02-26

I'm posting this to the forums, since my email to has gone without any replies. I'm not sure where to find it either. So I'll try this.

I'm in the process of migrating an existing system to glassfish

At this point, we're trying to get the bean pool's & connection pools tuned appropriately for our apps.

I've enabled high monitoring server-wide, and started running some normal usage pattern test cases on our servers.

I'm accustomed to C3P0 connection pools, which are really easy to instrument and gauge your pool resource usage.
With C3P0 the most pertinent data points we monitor when tuning the app are:
numConnections (current pool size)
numBusyConnections (number of connections currently in use)
maxPoolSize (maximum size of pool)
minPoolSize (min / steady pool size)

It looks like the analogous values in GF monitoring would be:
NumConnCreated - NumConnDestroyed = current pool size
NumConnUsed = number of connections currently in use

And then I could read the min / max off the pool's config.

The problem that I have, is that the numbers I'm seeing in the GF monitoring data don't make sense!

For instance, right now I have NumConnFree = -3989, and NumConnUsed = 4000, on a pool that's configured with a maximum connection size of 75.

How can the number of free connections in the pool be a _negative_ number, and how can NumConnUsed be so high?

Am I reading the intent of these metrics incorrectly because I'm expecting to be able to see the current state of the pool rather than just hit counters?