2 days ago
Our worker service (Docker image, 1 replica, US East, restart policy Never) has been killed four times without any shutdown log: 2026-11-17T00:11Z, 2026-11-20T11:31Z, 2026-11-25T06:55Z and 2026-11-26T10:15Z (UTC), after running about 47 h, 82 h, 51 h and only 9 h. The process handles SIGTERM and logs a stop line within ~1.5 s (draining is 30 s), and that line never appeared. Memory stayed flat between roughly 50 and 130 MB against an 8 GB limit, CPU near 0, and we received no OOM alert. Could you tell us what terminated the container at those times (host migration, maintenance, SIGKILL, OOM)? And is there a way to be notified before such events, or to avoid them?
3 Replies
2 days ago
From what we can see for your worker, none of those four stops line up with a Railway-initiated redeploy. When we move a service to another host, it creates a new deployment, and that deployment shows a banner above the Active deployment. On 2026-11-26 the process stopped at about 10:15 UTC, no new deployment was created, and your SIGTERM handler's stop line never appeared. What ended the process at those times isn't clear from the records we can read.
On notice and avoiding these stops: we give advance warning when a host needs security or performance updates. Host migrations can't be opted out of, and on Hobby a service can also be moved to another host ahead of time to balance load. In every one of those cases you get a new deployment, and the old one receives SIGTERM before SIGKILL, with the grace period set by RAILWAY_DEPLOYMENT_DRAINING_SECONDS. So a stop with no new deployment and no SIGTERM looks different from a migration. Because your restart policy is Never, the service stays down after any unexpected exit until someone redeploys or restarts it.
To narrow this down, please send the exit code or status message shown on the deployment in the dashboard for each of the four stops, plus the last few log lines before each one, with any secrets redacted.
Status changed to Awaiting User Response Railway • 2 days ago
8 hours ago
Thanks, that helps. After re-reading the logs, I need to correct one thing: the 2026-11-26 ~10:15 UTC stop was not an external kill. Our worker logged a connection reset (ECONNRESET, 4 ms) on a call to our database API, stopped itself safely by design, and should have exited with code 1. Sorry for the noise.
That leaves three stops with no shutdown line, no SIGTERM handler line and no new deployment: 2026-11-17 ~00:11 UTC, 2026-11-20 ~11:31 UTC and 2026-11-25 ~06:55 UTC. Their deploy logs are no longer visible in the dashboard, so I can only share what we noted at the time: on 11-20 only the startup line; on 11-25 the last line was a handled request timeout about 3h40m before the stop; on 11-17 no shutdown line. Could you check the exit code or status for those three deployments on your side, and whether there was any host-level event (node restart, host OOM) at those times?
Status changed to Awaiting Railway Response Railway • about 8 hours ago
8 hours ago
Thanks for the correction on 11-26. For the remaining three stops (2026-11-17 00:11 UTC, 2026-11-20 11:31 UTC and 2026-11-25 06:55 UTC), the deployments that were running then are no longer available to us, so we can't give you an exit code or status message for them. We also don't have a notified host maintenance or migration tied to your workspace at those times, and as covered earlier, a migration would have created a new deployment and sent SIGTERM first. What ended the process at those three times is not established from the records we can read.
If it happens again, the exit code or status on the deployment, captured while that deployment is still visible in the dashboard, along with the exact time in UTC, is what will let us tell an in-process exit apart from an external kill.
Status changed to Awaiting User Response Railway • about 8 hours ago