Skip to content

Metric pgcat_pools_sv_idle reports incorrect values #450

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

Closed
jbub opened this issue May 22, 2023 · 3 comments
Closed

Metric pgcat_pools_sv_idle reports incorrect values #450

jbub opened this issue May 22, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@jbub
Copy link
Contributor

jbub commented May 22, 2023

Describe the bug
We run pgcat in k8s with 3 replicas. We scrape the prometheus metrics and visualize them in grafana. The pgcat_pools_sv_idle metric seems to be reporting incorrect numbers as the connections on the postgres side stay stable and are not reflecting what pgcat is reporting. In the application, we are using https://github.com/lib/pq Go driver to connect to pgcat. The pgcat_pools_sv_idle just seems to go up over time.

To Reproduce
Config is here https://gist.github.com/jbub/ef1a1d5436aefca06e51c59c1b8a1150. I noticed that bumps in the metric happen especially when the pool is full and application receives this error pq: could not get connection from the pool.

Expected behavior
The pgcat_pools_sv_idle metric reports correct numbers.

Screenshots

The huge drop in the metric is restart/redeploy.

image

@levkk
Copy link
Contributor

levkk commented May 22, 2023

#445 Should help with this

@levkk levkk added the bug Something isn't working label May 22, 2023
@drdrsh
Copy link
Collaborator

drdrsh commented May 23, 2023

@jbub I merged a PR that should fix this problem. Please let us know if you are still seeing this after upgrading
#445

@drdrsh drdrsh closed this as completed May 23, 2023
@jbub
Copy link
Contributor Author

jbub commented Jun 5, 2023

@drdrsh Thanks, just deployed the new release, will report how it behaves over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants