mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(api): wait for Postgres and Redis at startup instead of crash-looping (#537)
Briefly retry Postgres and Redis connectivity at boot (waitForService, DB_STARTUP_TIMEOUT_MS) so an ordered-but-not-yet-ready dependency recovers cleanly instead of crash-looping.
This commit is contained in:
@@ -67,6 +67,10 @@ APP_NAME=snapotter
|
||||
DATABASE_URL=postgres://snapotter:snapotter@localhost:5432/snapotter
|
||||
# Redis connection (required; this default matches docker-compose.dev.yml)
|
||||
REDIS_URL=redis://localhost:6379
|
||||
# Startup grace: wait this long (ms) for Postgres/Redis to accept connections
|
||||
# before failing. Lets a dependency that is still booting recover instead of
|
||||
# crash-looping. 0 = try once, fail fast.
|
||||
DB_STARTUP_TIMEOUT_MS=30000
|
||||
|
||||
# Job spine tuning
|
||||
SYNC_WAIT_MS=8000 # sync-response window (ms) before returning 202
|
||||
|
||||
Reference in New Issue
Block a user