fix(api): report the real keepalive interval in pool health

The /api/connection-pool/health endpoint hardcoded a keepalive interval
of 15s while the pool actually uses 45s, so it reported a false value.
The endpoint now reads the live keepAliveInterval field. A startup
backoff comment that claimed jitter is also corrected; the backoff has
no jitter.
This commit is contained in:
2026-08-14 13:01:20 +01:00
parent 70b86c779b
commit 6171436a99
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -573,7 +573,7 @@ func apiConnectionPoolHealth(c fiber.Ctx) error {
"connection_failures": connectionFailures,
"last_recovery_attempt": stats["last_recovery_attempt"],
"cleanup_interval": "30s",
"keepalive_interval": "15s",
"keepalive_interval": poolMgr.keepAliveInterval.String(),
"recovery_check_interval": "60s",
}
+1 -1
View File
@@ -91,7 +91,7 @@ func (bhm *BackendHealthManager) WaitForBackendReady(timeout time.Duration) erro
})
}
// Exponential backoff with jitter
// Exponential backoff (1.5x growth, capped at maxDelay), no jitter
time.Sleep(currentDelay)
currentDelay = time.Duration(float64(currentDelay) * 1.5)
if currentDelay > maxDelay {