/health answers 503 when the relay cannot reach its database (relay#60) #156

Merged
paulhitt merged 1 commits from fix/health-checks-the-database into main 2026-09-08 13:13:57 +00:00
paulhitt commented 2026-09-08 12:18:58 +00:00 (Migrated from gitlab.com)

Closes #60.

Reuses the SELECT 1 that /status already runs, so the two endpoints cannot disagree.

Draining still answers 200 draining and outranks the database check; a healthy relay still answers exactly ok (the staging gate compares that literal for 25s); only notAnswering fails, so a driver with no SQL surface is not permanently unhealthy.

Verified against a running relay in all three states — ok/200, database unreachable/503, then ok/200 once it recovered.

Closes #60. Reuses the `SELECT 1` that `/status` already runs, so the two endpoints cannot disagree. Draining still answers 200 `draining` and outranks the database check; a healthy relay still answers exactly `ok` (the staging gate compares that literal for 25s); only `notAnswering` fails, so a driver with no SQL surface is not permanently unhealthy. Verified against a running relay in all three states — ok/200, database unreachable/503, then ok/200 once it recovered.
paulhitt (Migrated from gitlab.com) merged commit 043fe9f23b into main 2026-09-08 13:13:57 +00:00
paulhitt commented 2026-09-08 13:13:58 +00:00 (Migrated from gitlab.com)

mentioned in commit 043fe9f23b

mentioned in commit 043fe9f23b2a54cb51511b422d990327165d3c56
paulhitt commented 2026-09-08 13:31:18 +00:00 (Migrated from gitlab.com)

mentioned in issue #60

mentioned in issue #60
Sign in to join this conversation.