a month ago
Description of the issue:
My service (whatsapp-bot-v3) has had 3 consecutive deployment attempts fail at Network → Healthcheck — 2 fresh builds from new commits, and 1 plain "Redeploy" of an already-built image (no rebuild). All three failed identically, while the previous deployment from ~1 day ago remains ACTIVE and healthy.
Deploy logs show the app starting cleanly every time:
- PostgreSQL connection established
- Server running on port 3000
- Health: http://localhost:3000/
- Webhook: http://localhost:3000/webhook
- Scheduler starts and ticks normally every minute for 4+ minutes (morning routes, attendance reminders, tracking link reminders all logging successfully)
Despite this, Railway's healthcheck against "/" reports "service unavailable" on every one of 14 retry attempts over ~5 minutes, and the deployment is marked failed.
What I've tried:
- Restarted the previous ACTIVE deployment — worked fine, no issue.
- Redeployed the failing image directly (no rebuild) — still failed healthcheck.
- Pushed a trivial no-op code change to force a fresh build — still failed healthcheck, identical pattern.
This strongly suggests a networking/infra-side issue between the healthcheck prober and this specific service/deployment, not an application-level problem, since the app is demonstrably alive and serving internally.
railway.json:
{
"build": { "builder": "NIXPACKS", "buildCommand": "npm install && npm run build" },
"deploy": { "startCommand": "node dist/index.js", "healthcheckPath": "/" }
}
Error messages: "Deployment failed during the network process" / "Healthcheck failed" / "1/1 replicas never became healthy!"
Attachments
4 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
Status changed to Solved ibsankaran04-prog • about 1 month ago
a month ago
Sorry, accidentally marked this as solved — it's still unresolved. Reopening for community help.
Status changed to Open Railway • about 1 month ago
a month ago
Starting Healthcheck
====================
Path: /api/health
Retry window: 5m0s
Attempt #1 failed with service unavailable. Continuing to retry for 4m59s - yep - everyone is having same issues - EU / AMS - no reported issues on status.railway.com but widespread
ddbruce
Starting Healthcheck ==================== Path: /api/health Retry window: 5m0s Attempt #1 failed with service unavailable. Continuing to retry for 4m59s - yep - everyone is having same issues - EU / AMS - no reported issues on status.railway.com but widespread
a month ago
Same here — clean startup logs (DB connected, port listening, scheduler ticking fine) but healthcheck fails every attempt. Tried fresh builds, redeploy, even IPv6 bind fix — all failed identically. Old deployment still active and healthy though. Good to know it's not just me — will wait for it to clear.
a month ago
This won't clear on its own, so don't wait on it. On Aug 28 we shipped a security fix that stopped the deploy healthcheck from following redirects. Your healthcheck path / answers with a 302 to /dashboard/login, so every attempt now counts as a failure even though the app is healthy. It passed before because the prober used to follow the redirect to a 200. The "service unavailable" wording is our misleading log message, and a fix is in review to show the real status code. Since your healthcheck comes from railway.json, change healthcheckPath there to a route that returns 200 directly without an auth redirect, a small /health endpoint works well, then redeploy.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • about 1 month ago