Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectionpool_inPool gauge not correcly reflecting connections in pool as it never decreases #1719

Open
jongunnip opened this issue Dec 31, 2023 · 0 comments

Comments

@jongunnip
Copy link

We are logging the connectionpool_inPool metric every minute to track open connections. Unfortunately, this metric appears to increase with each new connection created and does not decrease when the connection is closed as the metric only increases over time. We can use netstat to see that there are nowhere near as many open connections as reported by connectionpool_inPool.

The connectionpool_inUse metric seems to be accurate.

Here is the code we use to register the metric colleciton in our Bootstrap.java:

// codahale metrics registry
var codahaleRegistry = new MetricRegistry();
bind(MetricRegistry.class).toInstance(codahaleRegistry);
Registry spectatorRegistry = new MetricsRegistry(Clock.SYSTEM, codahaleRegistry);
bind(Registry.class).toInstance(spectatorRegistry);

We are using Zuul 2.4.0. We saw the same behavior in 2.3.0. I attempted to look at the code that tracks these metrics but the increment/decrement logic for the connection tracking was hard for me to follow as it appeared to be sprinkled across many methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant