Skip to content

Commit cff2ba3

Browse files
authored
Merge pull request #828 from Icinga/set-ha-conn-limit
HA: Limit max open database connections to `1`
2 parents e9fefa2 + ce3309f commit cff2ba3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/icingadb/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func run() int {
114114
logger.Fatalf("%+v", errors.Wrap(err, "can't create database connection pool from config"))
115115
}
116116
defer func() { _ = db.Close() }()
117+
db.SetMaxOpenConns(1)
117118
ha = icingadb.NewHA(ctx, db, heartbeat, logs.GetChildLogger("high-availability"))
118119

119120
telemetryLogger := logs.GetChildLogger("telemetry")

0 commit comments

Comments
 (0)