17.8. connPoolStats

Prints connection pool statistics. For details on all parameters and configuration check https://www.mchange.com/projects/c3p0/ and the Connection Pool's Section on the Configuration Guide.

This command prints the following information:

Datasource Datasource name and id.
Max pool size Maximum number of connections a pool will maintain at any given time.
Number of connections Current total number of connections in the pool (both busy and idle).
Busy connections Number of busy connections in the pool. These connections are already checked out from the pool.
Idle connections Idle of busy connections in the pool. These connections can be checked out from the pool in order to be used.
Threads awaiting connection checkout Number of threads currently waiting for a connection from the connection pool.
Unclosed orphaned connections Number of checked out connections from the pool but not longer being managed by the connection pool.

In order to monitor the connection pool usage, two important parameters are ''numBusyConnections'' and ''numThreadsAwaitingCheckoutDefaultUser''. If the ''numBusyConnections'' reaches the ''maxPoolSize'', this means that all the connections in the connection pool have exhausted and you will see ''numThreadsAwaitingCheckoutDefaultUser'' increasing. This means that the number of connections in the connection pool is not enough for the current load.