Skip to content

Metric pgcat_pools_sv_idle reports incorrect values #450

Closed
@jbub

Description

@jbub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions