diff --git a/services/pgnotifier/pgnotifier.go b/services/pgnotifier/pgnotifier.go index 609b9f1b8a..ed3d594ca4 100644 --- a/services/pgnotifier/pgnotifier.go +++ b/services/pgnotifier/pgnotifier.go @@ -128,6 +128,7 @@ func New(workspaceIdentifier, fallbackConnectionInfo string) (notifier PGNotifie if err != nil { return } + dbHandle.SetMaxOpenConns(config.GetInt("PgNotifier.maxOpenConnections", 20)) // setup metrics pgNotifierModuleTag := whUtils.Tag{Name: "module", Value: "pgnotifier"} diff --git a/warehouse/warehouse.go b/warehouse/warehouse.go index 48df8e64fc..4a31e18899 100644 --- a/warehouse/warehouse.go +++ b/warehouse/warehouse.go @@ -1617,6 +1617,7 @@ func setupDB(ctx context.Context, connInfo string) error { if err != nil { return err } + dbHandle.SetMaxOpenConns(config.GetInt("Warehouse.maxOpenConnections", 20)) isDBCompatible, err := validators.IsPostgresCompatible(ctx, dbHandle) if err != nil {