Skip to content

Connections are leaking #898

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
MTRNord opened this issue Aug 31, 2023 · 1 comment
Closed

Connections are leaking #898

MTRNord opened this issue Aug 31, 2023 · 1 comment

Comments

@MTRNord
Copy link

MTRNord commented Aug 31, 2023

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

  • System information:

    Linux 6.1.31-gentoo-x86_64 x86_64 (inside kubernetes pod using the docker image provided in this repo)

  • postgres_exporter version:

    postgres_exporter, version 0.13.1 (branch: master, revision: 5890879)
    build user: root@43776d249d3b
    build date: 20230825-09:22:12
    go version: go1.20.7
    platform: linux/amd64
    tags: netgo static_build

  • postgres_exporter flags:

--config.file=/etc/postgres_exporter.yml --web.listen-address=:9187
  • PostgreSQL version:

    matrix-postgres-cluster-0:/home/postgres# postgres --version
    postgres (PostgreSQL) 15.2 (Ubuntu 15.2-1.pgdg22.04+1)

  • Logs:

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

(this is repeated a lot. But otherwise no logs after startup)

@sysadmind
Copy link
Contributor

This was fixed in #902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants