Skip to content
calm-blue
burni80
OP

4 months ago

Description: Self-hosted CouchDB for Obsidian LiveSync

Category: Storage

URL: https://railway.com/deploy/calm-blue-1

1 Reply

burni80
OP

4 months ago

Railway Healthcheck Intermittent Failure — Fix

Root Cause

Gunicorn is likely binding to 127.0.0.1 (localhost) instead of 0.0.0.0 (all interfaces). Railway's healthcheck can't reach the app on 127.0.0.1, so it retries 14x and tears down the deployment — even though gunicorn/Django boot fine internally.

This also explains why build logs show "Healthcheck succeeded" but the deploy fails: the builder's healthcheck runs in a different network context than runtime.

Fix

Change your gunicorn start command to bind 0.0.0.0:

gunicorn myproject.wsgi:application --bind 0.0.0.0:${PORT:-8080}

Or via gunicorn.conf.py:

bind = "0.0.0.0:8080"

Or via env vars:

HOST=0.0.0.0
PORT=8080

If it still fails

  1. Add a lightweight healthcheck endpoint (/health/) that doesn't hit the DB, and set healthcheckPath in railway.toml.
  2. Increase healthcheckTimeout to 30s.
  3. Open a Railway ticket referencing your deployment IDs (b1d132c7, e5280956) — their own build logs contradicting deploy state points to a platform-side issue.

Welcome!

Sign in to your Railway account to join the conversation.

Loading...