From 1273715d11b99d6f819bc3f54d1f1ba795186760 Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Thu, 23 Jun 2022 11:11:27 +0200 Subject: [PATCH] Fix connection issue to multiple databases. Co-Authored-By: Andrii Skomorokhov Signed-off-by: Denys Kondratenko --- cmd/postgres_exporter/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/postgres_exporter/server.go b/cmd/postgres_exporter/server.go index 8747dffa0..e37440c4c 100644 --- a/cmd/postgres_exporter/server.go +++ b/cmd/postgres_exporter/server.go @@ -69,7 +69,7 @@ func NewServer(dsn string, opts ...ServerOpt) (*Server, error) { return nil, err } db.SetMaxOpenConns(1) - db.SetMaxIdleConns(1) + db.SetMaxIdleConns(-1) level.Info(logger).Log("msg", "Established new database connection", "fingerprint", fingerprint)