diff --git a/src/core/dependencies.py b/src/core/dependencies.py index 6da54ee..5e9df33 100644 --- a/src/core/dependencies.py +++ b/src/core/dependencies.py @@ -568,12 +568,15 @@ async def shutdown_clients(): # Per-probe timeout for the concurrent health checks below, in seconds. # -# Bounded well under the container healthcheck's 10s timeout (see Dockerfile) -# so that five probes run concurrently under asyncio.gather cannot approach -# it even if all five hang. A probe that has no timeout of its own (neo4j, -# qdrant) otherwise falls back to its driver's default — 30s for both — which -# is what let a hung dependency (not a failing one) flip the container -# unhealthy. +# Bounded well under the container healthcheck's 10s timeout (see Dockerfile). +# Because every probe runs concurrently under one asyncio.gather, the wall time +# is one bound rather than the sum, so adding probes does not erode the margin — +# all eight can hang and the call still returns in ~2s. +# +# A probe with no bound of its own falls back to its client's default: 30s for +# the neo4j and qdrant drivers, 30s for the scheduler client, and none at all +# for system settings. Each is past the 10s budget on its own, which is what let +# a hung dependency — not a failing one — flip the container unhealthy. HEALTH_PROBE_TIMEOUT = 2.0