2 months ago
Title: PGlite Database — Volume Backup Consistency and Isolated Restore
Hello Railway Community,
I'm evaluating Railway Pro for volume backups.
My application runs Node.js with an embedded PGlite database stored on a persistent Railway volume.
Before upgrading, I'd appreciate clarification on three questions:
- Can Railway create a consistent volume backup while PGlite is running and actively writing?
- Can a backup be restored into a separate test volume or service without modifying the original?
- Has anyone successfully tested this backup-and-restore workflow with PGlite?
I'm particularly interested in database consistency and safe recovery testing.
Thanks!
4 Replies
2 months ago
Volume backups cover any data stored in a volume, including embedded databases like SQLite, and can be taken manually or on a daily, weekly, or monthly schedule. Restores can only happen within the same project and environment where the backup was created.
A restore never writes into your existing volume. It creates a new volume from the backup and stages a change that swaps your service onto it. The original volume is kept, and nothing changes for the running service until you review and deploy that staged change. If you discard the staged change instead, the service stays on its current volume and the restored copy sits unattached. That restore flow does not give you a way to mount the copy into a separate test service, so isolated restore testing alongside the live database is not part of it. See Backups for the full restore steps.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
Thank you for the explanation.
I have two remaining technical questions specific to embedded PGlite:
-
Does Railway guarantee that volume backups taken while PGlite is actively writing are application-consistent and recoverable, or would the application need to pause database writes or shut down before a backup?
-
Can the new volume created during restoration be attached to a separate test service within the same project and environment, allowing us to validate PGlite recovery without modifying or replacing the original service's attached volume?
I'm looking for a supported recovery-testing procedure rather than only confirmation that volume snapshots are available.
If possible, I'd appreciate clarification from a Railway engineer familiar with volume backup consistency and restoration.
Thank you!
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
Our backups documentation describes volume backups as incremental, copy-on-write snapshots of the volume's contents. It doesn't describe any coordination with the application running against the volume, so there is no documented guarantee that a backup taken while PGlite is writing is application-consistent.
For restores, the supported flow creates a new volume from the backup and stages a swap onto the original service, and the previous volume is kept unmounted. That flow doesn't include attaching the restored volume to a separate test service, so we don't have a supported procedure for testing recovery in isolation alongside the original service.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
Title: Railway Node.js Deployment Killed with Exit Code 137 — Possible OOM?
Hi Railway Community,
I'm troubleshooting a Node.js 24 application deployed on Railway that unexpectedly terminates during startup.
The application uses PGlite 0.3.16 with a persistent Railway volume.
What happened:
- The application completed its initial database initialization and schema checks.
- During the next initialization phase, the process was unexpectedly killed.
- Deployment logs show:
Killed
[ELIFECYCLE] Command failed with exit code 137.The process ran for approximately two seconds before termination.
Railway's CPU and memory metrics do not show a significant spike, possibly because the process terminated too quickly for the graphs to capture it.
Questions:
- Is exit code 137 commonly associated with OOM kills on Railway?
- Is there a way to retrieve historical OOM-kill information or container termination reasons?
- How can I verify the effective memory and CPU limits for a deployment?
- Could Railway terminate a process with SIGKILL for reasons unrelated to memory exhaustion?
I'm trying to diagnose the issue before modifying resources or redeploying.
Any guidance would be appreciated. Thank you!
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago