Postgres service crashed - failed to exec pid1 - data at risk (Resolved )
mkorchi82
HOBBYOP

a month ago

My Postgres service has been crashed since April 24, 2026. The deploy logs show this error repeating continuously:

ERROR (catatonit:2): failed to exec pid1: No such file or directory

I cannot take a backup because the database is not running. I am on the Hobby plan so automated backups are not available. The data volume (postgres-volume) is still attached.

Project: affectionate-benevolence

Service: Postgres / Deployment: 7354a58b

Please help me restore the Postgres service without data loss.

Solved$10 Bounty

5 Replies

Status changed to Open Railway about 1 month ago


futsy
HOBBY

a month ago

This error usually means Railway’s init process cannot exec the container’s real entrypoint. For a Postgres service on Railway, I would check two things before trying any data migration:

  1. In the Postgres service, go to Settings -> Deploy and make sure there is no custom Start Command or Pre-deploy Command set. If anything like npm start, Prisma, Django, or app commands were accidentally applied to the Postgres service, clear those fields back to default.

  2. Then redeploy the existing Postgres service, keeping the existing postgres-volume attached. Do not detach/delete the volume and do not create a replacement database for recovery yet.

This exact ERROR (catatonit:2): failed to exec pid1: No such file or directory has also been showing up during the May 19 Railway image-registry/deployment disruption. Railway’s current guidance on matching threads is to redeploy once deployments are working again, because redeploying pulls a fresh image. The data should remain on the attached persistent volume through the redeploy.

If it still crash-loops after that, share whether the Postgres service has any custom command configured and the image/tag shown for the service.


Status changed to Awaiting User Response Railway about 1 month ago


gregxsunday
PRO

a month ago

I've had the same today. I redeployed postgres instead of restarting it and it came back online


Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Awaiting User Response Railway about 1 month ago


fizzysoftware
HOBBY

a month ago

What happens if we dont have backups (like on Hobby plan)? Do we loose data when redeploying?


Status changed to Awaiting Railway Response Railway about 1 month ago


fizzysoftware

What happens if we dont have backups (like on Hobby plan)? Do we loose data when redeploying?

No, the data is stored on the volume.


mkorchi82
HOBBYOP

a month ago

Thank you so much! The fix worked perfectly. I went to Settings → Deploy, confirmed there was no custom Start Command set, then redeployed the Postgres service. It came back online and all my data is still intact. Really appreciate the fast and clear help!

Attachments


Status changed to Solved Railway about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...