Bug 63705 - The tomcat pool doesn't register all connection through JMX
Summary: The tomcat pool doesn't register all connection through JMX
Status: NEW
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: PC
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2019-08-29 08:11 UTC by Borja
Modified: 2019-08-29 11:02 UTC (History)
0 users

Screenshot of the pool in JConsole (33.95 KB, image/png)
2019-08-29 08:11 UTC, Borja

Note You need to log in before you can comment on or make changes to this bug.
Description Borja 2019-08-29 08:11:31 UTC
Created attachment 36742 [details]
Screenshot of the pool in JConsole

I used the "JConsole" tool to monitor a tomcat connection pool through JMX.

The pool indicated that there were four idle connections, but only two of them were visible in the monitoring tool.

In addition, the initial size of the pool was six and six connections were created (I checked it by debugging the code), but for some reason two of them were closed, and the pool was left with the minimum number of idle connections (four connections).

I guess it's the normal behavior of the pool. However, if there are four connections, all of them should be registered through JMX, not just two.

Tomcat pool:
  - Initial size: 6
  - Min idle: 4
  - Max idle: 30
  - Max active: 40

Tomcat version: 9.0.22