Merge pull request #828 from Icinga/set-ha-conn-limit

HA: Limit max open database connections to `1`
This commit is contained in:
Eric Lippmann 2024-12-17 22:18:12 +01:00 committed by GitHub
commit cff2ba343a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,6 +114,7 @@ func run() int {
logger.Fatalf("%+v", errors.Wrap(err, "can't create database connection pool from config"))
}
defer func() { _ = db.Close() }()
db.SetMaxOpenConns(1)
ha = icingadb.NewHA(ctx, db, heartbeat, logs.GetChildLogger("high-availability"))
telemetryLogger := logs.GetChildLogger("telemetry")