-
Notifications
You must be signed in to change notification settings - Fork 807
Open
Description
What did you do?
- Have postgres-exporter running
- Have a kind of lock to the database -> some requests of postgres-exporter are locked (for instance, on a WAL saturated instance, a big DELETE locking the stats)
- Have a prometheus server fetching the data
What did you expect to see?
- one or a few connections connection opened to the server
- Some errors of scrapping maybe
What did you see instead? Under which circumstances?
- On the database, a huge perf issue arise (likely due to dbt)
- postgres-exporter accumulates postgresql queries stuck
- Since we did not cap enough the user, it accumulates more than 50% of available connections (in an example, 53 open connections (fair enough, I should have used a user with less privileges, will do), avoiding other clients to connect
I would expect the connections to be canceled at some point (for instance when the prometheus query times out.
Example:
We have 53 queries in flight with the user...
Environment
- System information:
In the container:
uname -srm
Linux 5.15.0-161-generic x86_64
- postgres_exporter version:
Using docker image prometheuscommunity/postgres-exporter:v0.17.1:
postgres_exporter --version
postgres_exporter, version 0.17.1 (branch: HEAD, revision: 1e574cf4fd2a75a8a707d424eafcaa0b88cb7af4)
build user: root@b0ba132eddb0
build date: 20250226-13:53:15
go version: go1.23.6
platform: linux/amd64
tags: unknown
- postgres_exporter flags:
None set, using the default ones only
-
PostgreSQL version: 17.1
-
Logs:
insert logs relevant to the issue here
Metadata
Metadata
Assignees
Labels
No labels