Metric pgcat_pools_sv_idle reports incorrect values
Closed this issue · 3 comments
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.