Postgres service crashes immediately: failed to exec pid1
tught3
HOBBYOP

a month ago

I checked Settings -> Deploy on the Postgres service.

There is no custom Start Command or Pre-deploy Command configured.

The existing postgres-volume is still attached.

Redeploying the existing Postgres service still crash-loops with:

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

Please advise how to recover the existing Postgres service/volume.

$10 Bounty

1 Replies

Status changed to Open Railway about 1 month ago


futsy
HOBBY

a month ago

ERROR (catatonit:2): failed to exec pid1: No such file or directory is not usually a sign that your Postgres volume was deleted or that you need a custom start command. It means the container entrypoint could not be loaded, and Railway has tied same-symptom Postgres cases to the Image Registry disruption.

I would do this:

  1. Keep the existing Postgres volume attached. Do not detach/delete it.
  2. On the existing Postgres service, redeploy the latest deployment.
  3. If it still fails once, wait a few minutes and redeploy again.
  4. After Postgres becomes active, restart/redeploy app services that connect to it so they reconnect cleanly.

The redeploy should pull a fresh Postgres image from the registry while preserving the attached volume data.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...