From 2dfa7d954207142dd05a0f54b840e05367a5c25f Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 1 Dec 2025 13:40:34 +0200 Subject: [PATCH] Enhance health check logic to allow partial database failures without throwing an error, improving resilience in environments with multiple databases. --- app/controllers/api/health.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 06de2c8f40..dc1113ed67 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -136,7 +136,9 @@ App::get('/v1/health/db') } } - if (!empty($failures)) { + // Only throw error if ALL databases failed (no successful pings) + // This allows partial failures in environments where not all DBs are ready + if (!empty($failures) && empty($output)) { throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures)); }