From 6171436a99ee9086416042f47e853d7f104fb36c Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 14 Aug 2026 13:01:20 +0100 Subject: [PATCH] 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. --- api.go | 2 +- backend_health.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api.go b/api.go index c73d946..14d8306 100644 --- a/api.go +++ b/api.go @@ -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", } diff --git a/backend_health.go b/backend_health.go index 883b68b..02e1d19 100644 --- a/backend_health.go +++ b/backend_health.go @@ -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 {