Bug #106844 APIs for Connection pool metrics like active, idle, expired connections' numbers
Submitted: 26 Mar 2022 11:58 Modified: 28 Mar 2022 7:23
Reporter: Hardik Chhatrala Email Updates:
Status: Verified Impact on me:
None 
Category:Connector for Node.js Severity:S4 (Feature request)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any
Tags: connection pooling, pool

[26 Mar 2022 11:58] Hardik Chhatrala
Description:
While using ConnectionPool couldn’t find any solution in the area of monitoring a current number of active, idle, expired connections in the pool.

How to repeat:
According to the source code, the client only returns two getSession and close functions so it is not possible to retrieve the above-mentioned metrics(active, idle, expired connections in the pool) from ConnectionPool's activeConnections() or other methods.

Need a public API that helps to monitor the current number of active, idle, expired connections in the pool at any given time. Without this, we couldn’t get any idea of what is going on with respect to resource utilization.

Suggested fix:
1. Need an API to get the number of active, idle, and expired connections in the pool using client if pooling: {enabled: true, ...}
[28 Mar 2022 7:23] MySQL Verification Team
Hello Hardik Chhatrala,

Thank you for the feature request!

regards,
Umesh