8 hours ago
Does Railway provide a supported way to stop a running replica from accepting new public and private requests while keeping that same replica and its console accessible for a final backup of ephemeral SQLite data? What can an operator observe per replica to confirm that previously accepted requests have finished, and which background jobs or retries must the application track itself? Guidance only, please.
3 Replies
8 hours ago
The shutdown controls we document apply to a whole deployment, not to one replica. When a new deployment becomes active, the previous one stays running for the overlap time (RAILWAY_DEPLOYMENT_OVERLAP_SECONDS). It is then sent SIGTERM and given the draining time (RAILWAY_DEPLOYMENT_DRAINING_SECONDS, 0 seconds by default) before SIGKILL. No other signals are sent, so the SIGTERM handler is where your application should stop accepting work, finish in-flight requests and write out the SQLite file. A container that has been killed can't be reached from the console afterward.
For per-request visibility, HTTP logs record each public request with its status, totalDuration and upstreamRqDuration. Private networking (*.railway.internal) skips the edge, so those requests don't show up in HTTP logs. Your application has to track that traffic itself, along with background jobs, retries, queue consumers and open connections. It should log when each of those has drained, so you can confirm in the deployment logs that it's safe to take the backup.
Status changed to Awaiting User Response Railway • about 8 hours ago
7 hours ago
Could a Railway staff member confirm one point for an already-running replica with no application-level drain instrumentation? Is there a supported operator procedure, without deploying a replacement or initiating shutdown, to block new public and private requests to that replica, verify that previously accepted requests have finished, and keep its console accessible until a final SQLite backup has been verified? We understand that application-owned jobs and retries require separate evidence. If Railway offers no such procedure for the existing replica, an explicit confirmation would answer our question. Guidance only, please.
Status changed to Awaiting Railway Response Railway • about 7 hours ago
4 hours ago
We don't offer a supported procedure that does what you describe for an existing replica. Replica controls work by setting the replica count per region, in the dashboard or with railway scale. Neither one lets you pick a specific replica to take out of rotation and keep running, and a replica removed this way is drained and shut down, so its console isn't available afterward.
While a replica is running, public traffic and TCP proxy traffic are spread across all replicas in the region, and you can't exclude one of them. Per replica, you can view resource usage in the Replica view of Metrics. That view doesn't tell you whether accepted requests have finished.
If you can't instrument the application, the safest way to get a verified backup is to stop all traffic to the whole service and copy the SQLite file while nothing is writing to it. Moving the database onto a volume would also mean its data no longer has to be captured before a replica goes away.
Status changed to Awaiting User Response Railway • about 4 hours ago