Monitor JDBC resources to measure performance and capture resource usage at runtime. As the creation of JDBC connections are expensive and frequently cause performance bottlenecks in applications, it is crucial to monitor how a JDBC connection pool is releasing and creating new connections and how many threads are waiting to retrieve a connection from a particular pool.
The statistics available for the JDBC connection pool are shown in the following table.
Table 18–9 JDBC Connection Pool Statistics
Statistic |
Units |
Data Type |
Description |
---|---|---|---|
numconnfailedvalidation |
Number |
CountStatistic |
The total number of connections in the connection pool that failed validation from the start time until the last sample time. |
numconnused |
Number |
RangeStatistic |
Provides connection usage statistics. The total number of connections that are currently being used, as well as information about the maximum number of connections that were used (the high water mark). |
numconnfree |
Number |
CountStatistic |
The total number of free connections in the pool as of the last sampling. |
numconntimedout |
Number |
BoundedRangeStatistic |
The total number of connections in the pool that timed out between the start time and the last sample time. |
averageconnwaittime |
Number |
CountStatistic |
Indicates the average wait time of connections for successful connection request attempts to the connector connection pool. |
waitqueuelength |
Number |
CountStatistic |
Number of connection requests in the queue waiting to be serviced. |
connectionrequestwaittime |
RangeStatistic |
The longest and shortest wait times of connection requests. The current value indicates the wait time of the last request that was serviced by the pool. |
|
numconncreated |
Milliseconds |
CountStatistic |
The number of physical connections that were created since the last reset. |
numconndestroyed |
Number |
CountStatistic |
Number of physical connections that were destroyed since the last reset. |
numconnacquired |
Number |
CountStatistic |
Number of logical connections acquired from the pool. |
numconnreleased |
Number |
CountStatistic |
Number of logical connections released to the pool. |