prometheus-community / postgres_exporter

A PostgreSQL metric exporter for Prometheus
Apache License 2.0
2.83k stars 745 forks source link

Connections are leaking #898

Closed MTRNord closed 1 year ago

MTRNord commented 1 year ago

What did you do?

I am running the prometheus-community helmchart. No autodiscovery, no config, one DSN setup. Nothing unusual afaik.

What did you expect to see?

I expected it to go up in connections and then hit a ceiling.

What did you see instead? Under which circumstances?

image

The connections went up to 50 until pg ran out of connections (total at pg is 240 connections + 3 superuser connections):

ts=2023-08-31T18:39:22.792Z caller=collector.go:173 level=error msg="Error opening connection to database" err="error querying postgresql version: pq: sorry, too many clients already"

Environment

--config.file=/etc/postgres_exporter.yml --web.listen-address=:9187
sysadmind commented 1 year ago

This was fixed in #902