3 months ago
Hey Railway folks,
I’m running into a deployment issue where my service fails with:
"Container failed to start"
Context:
Node.js (Express) backend
Deployed via Nixpacks (nodejs_20)
Build completes successfully
npm startis used as the start commandDeployment fails immediately after build with no runtime logs
Logs show:
Build succeeds
No application logs appear
After some time: “Container failed to start / Failed to create deployment”
What I’ve verified:
App listens on
process.env.PORTand binds to0.0.0.0Health check (
/health) exists and returns 200No nodemon / dev tools in production
App runs locally with
npm startAdded global error handlers for uncaughtException / unhandledRejection
Using Express + Stripe (webhooks)
Suspicion:
The Node process may be exiting immediately at startup (possibly due to top-level imports or env-dependent code like Stripe initialization), before the server stays alive.
Question:
Is there a recommended way on Railway to:
Debug silent container exits at startup?
Surface startup-time crashes more explicitly?
Or confirm whether
npm startis executing the expected entry file?
Happy to share snippets or repo details if needed.
Thanks
19 Replies
3 months ago
+1 same thing here
3 months ago
Hey can we get any help here?
Hey @Mohit Sapat,
I'm encountering the same issue, I believe it's some problem with the deployment because I have branches that are already deployed also failing to deploy
2 months ago
This is happening to me as well. I thought it was due to config changes I made, but I reverted to a previously working commit and even that commit is no longer deploying. It builds without problem and then "deploys" for ~26 minutes, then fails. Has happened repeatedly for the past 17 hours.
Curious if everyone's services are on Railway metal? Mine is, and here's a thread of someone who briefly had the same issue after a service was pinned to metal: https://discord.com/channels/713503345364697088/1453775315754160128
2 months ago
Just following up in case a Railway team can take a look
Multiple users here (including me) are seeing the same pattern:
Build succeeds
No runtime logs
Deployment hangs ~20–30 min
Fails with “Container failed to start”
Reverting to previously working commits does not help
There seems to be a strong correlation with services pinned to Railway Metal.
This started recently and appears unrelated to app code.
Could you please confirm if there’s an ongoing issue or recent change affecting Metal deployments?
Happy to share repro details if needed.
FWIW, unchecking "Use Metal Build Environment" and redeploying doesn't fix it.
after unticking metal and testing with nixpacks it hangs on "Build time: 77.47 seconds"
Tried duplicating the service, didn't work for me. This seems like an issue with people on the hobby plan; I don't see anyone on the pro plan facing this issue.
Having the same issue, I tried unchecking metal and deploying a previous successful build. No luck. Haven't tried deleting the service yet.
2 months ago
For anyone experiencing an issue, please open your own help thread and, if possible, include steps to reproduce the problem.
Most of the time these errors occur because your application crashes too early without generating any logs.
@ThallesComH All of us have already mentioned that our services had been running and deploying fine prior to us encountering this issue. In fact, most people have also mentioned the fact that we have tried deploying branches that had previously successfully deployed, and even those branches are failing to deploy. None of us has visibility into what is causing this failure. According to the logs, there are no errors while building the image; it only gets stuck while trying to upload the image.
@ThallesComH I've opened a separate thread as requested, no response at the moment, issue is persistent.
Duplicating the service or even the entire stack to a new environment didn’t work. Had to delete the problematic service and re-add it.
2 months ago
Same issue here. Something got broken. Seems to point to the automatic involuntary upgrade to metal edge
2 months ago
Deleted and recreated service, up and running now. Agreed that it's metal upgrade related.