Liveness Check
Liveness probe — process + asyncio loop responsiveness check only.
Returns 200 + {"status": "alive", ...} if the FastAPI worker is
reachable and the event loop is not wedged. Does NOT touch the
database. Does NOT touch Redis.
Intended as the Traefik routing probe so that a sick database (pool drain, replica lag, query storm) does NOT cause Traefik to de-register the backend. When the DB is sick:
• /v1/health/live → 200 → Traefik keeps routing
• /v1/health/ready → 503 → docker marks unhealthy,
monitoring alerts fire, operator intervenes
The cached / static / Redis-only paths can still serve while the
DB recovers, instead of the whole service 404’ing at the edge —
which is exactly what bit prod in the 2026-05-17 outage (memory
prod_outage_2026_05_17_entitlements_pool_drain).
The await asyncio.sleep(0) is intentional: it yields control
back to the event loop for a single tick, so if a sync handler is
pegging the loop the probe will still time out (correctly surfacing
the wedge). Without it a wedged loop could in theory complete this
coroutine synchronously between handlers.
Response
Successful Response
Response for /v1/health/live.
Deliberately distinct from HealthResponse so monitoring tools
can pin on status == "alive" (intent-revealing) without having
to also accept the existing "ok" value used by /v1/health.
No nested checks — the probe never touches DB or Redis.