2 months ago
Project: navjotschahal30-ai/vern
Service: vern-production
Latest deployment ID: 9bee53d9-8254-4af1-a454-3edcf4ef945c
Issue: Build succeeds, image pushes, but container never transitions to running (0/1 replicas). Zero deploy/runtime logs emitted. /health 502s after 15s. App runs fine locally with identical code/env vars.
Why does the container not start? What's the crash/health-check failure reason?
Pinned Solution
2 months ago
Make sure the PORT variable is set the port your app is listening on.
3 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 2 months ago
2 months ago
Make sure the PORT variable is set the port your app is listening on.
2 months ago
- App isn't listening on the port the platform expects. This is the #1 cause of "works locally, won't start in prod." Most platforms inject a PORT env var and route health checks to it. If your app hardcodes a port (e.g. 3000 or 9000) or binds to localhost/127.0.0.1 instead of 0.0.0.0, the health check hits nothing → 502 → replica never goes healthy.
Fix: bind to 0.0.0.0 and read the port from process.env.PORT.
- Health check path/timing is wrong. The platform pings /health and gives up after a window. If your app takes longer than that to boot (migrations, warm-up) — or /health doesn't exist on that route — it's marked unhealthy and killed. The 15s timing you mention suggests a short health-check grace period.
darseen
Make sure the `PORT` variable is set the port your app is listening on.
a month ago
This helped thanks
Status changed to Solved medim • about 1 month ago