Skip to content

Fix Railway 502: add /health endpoint and DB init retry logic#234

Merged
michaelchu merged 1 commit intomainfrom
claude/railway-domain-setup-ED12H
Feb 28, 2026
Merged

Fix Railway 502: add /health endpoint and DB init retry logic#234
michaelchu merged 1 commit intomainfrom
claude/railway-domain-setup-ED12H

Conversation

@michaelchu
Copy link
Copy Markdown
Member

_init_db_sync() runs at module import time and crashes the process if
PostgreSQL is unreachable (e.g. Railway starting the DB concurrently).

  • Add retry with exponential backoff (5 attempts) to _init_db_sync()
  • Add /health endpoint returning {"status": "ok"}
  • Point railway.toml healthcheckPath at /health

https://claude.ai/code/session_01WUMXsDVCNND6bzKWmHRuGp

_init_db_sync() runs at module import time and crashes the process if
PostgreSQL is unreachable (e.g. Railway starting the DB concurrently).

- Add retry with exponential backoff (5 attempts) to _init_db_sync()
- Add /health endpoint returning {"status": "ok"}
- Point railway.toml healthcheckPath at /health

https://claude.ai/code/session_01WUMXsDVCNND6bzKWmHRuGp
@michaelchu michaelchu merged commit 8d41621 into main Feb 28, 2026
8 checks passed
@michaelchu michaelchu deleted the claude/railway-domain-setup-ED12H branch February 28, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants