From 3796b5757ee6437dc1b05689c9c0f238e8c1260e Mon Sep 17 00:00:00 2001 From: David Echelberger Date: Thu, 6 Jan 2022 10:30:55 -0500 Subject: [PATCH 1/2] [psql-maxconns] default connection limit for postgresql Signed-off-by: David Echelberger --- internal/database/postgres/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/database/postgres/config.go b/internal/database/postgres/config.go index 1304a2edce..7d9fe019dd 100644 --- a/internal/database/postgres/config.go +++ b/internal/database/postgres/config.go @@ -18,8 +18,14 @@ package postgres import ( "github.com/hyperledger/firefly/internal/config" + "github.com/hyperledger/firefly/internal/database/sqlcommon" +) + +const ( + defaultConnectionLimitPostgreSQL = 50 ) func (psql *Postgres) InitPrefix(prefix config.Prefix) { psql.SQLCommon.InitPrefix(psql, prefix) + prefix.SetDefault(sqlcommon.SQLConfMaxConnections, defaultConnectionLimitPostgreSQL) } From 5740e9bc977763bbd8051f74e869f2fcf1ff4777 Mon Sep 17 00:00:00 2001 From: David Echelberger Date: Thu, 6 Jan 2022 10:36:49 -0500 Subject: [PATCH 2/2] [psql-maxconns] copyright year Signed-off-by: David Echelberger --- internal/database/postgres/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/database/postgres/config.go b/internal/database/postgres/config.go index 7d9fe019dd..51ef3fc0b3 100644 --- a/internal/database/postgres/config.go +++ b/internal/database/postgres/config.go @@ -1,4 +1,4 @@ -// Copyright © 2021 Kaleido, Inc. +// Copyright © 2022 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 //