2 months ago
I'm deploying postgres with schema for the first time and get 'pid failures':
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/93230ecc-d0da-451d-a405-62537dddbce7/vol_n7473zr5byevm7vq
Starting Container
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/93230ecc-d0da-451d-a405-62537dddbce7/vol_n7473zr5byevm7vq
ERROR (catatonit:2): failed to exec pid1: No such file or directory
ERROR (catatonit:2): failed to exec pid1: No such file or directory
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/93230ecc-d0da-451d-a405-62537dddbce7/vol_n7473zr5byevm7vq
ERROR (catatonit:2): failed to exec pid1: No such file or directory
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/93230ecc-d0da-451d-a405-62537dddbce7/vol_n7473zr5byevm7vq
4 Replies
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
go into the service settings, then the deploy tab, and clearing out any custom start command or pre-deploy commands that might be set. just reset them to defaults and redeploy. the catatonit pid1 error usually means the container init process is messed up and this should sort it out
2 months ago
I need to provision schema and data into the postgres database and have tried adding
Build Command:
npm install && npx prisma generate && npm run build
Start Command:
npx prisma migrate deploy && npm start
to my app service, but it keeps reverting to npm install and npm start.
I did try adding npm commands to the postgres container and this is were the pid problem arises. Like you suggest, if I remove all custom commands, it builds, but has no schema and no data.
tekspirit
I need to provision schema and data into the postgres database and have tried adding Build Command:npm install && npx prisma generate && npm run buildStart Command:npx prisma migrate deploy && npm startto my app service, but it keeps reverting to npm install and npm start.I did try adding npm commands to the postgres container and this is were the pid problem arises. Like you suggest, if I remove all custom commands, it builds, but has no schema and no data.
2 months ago
i see the issue , those commands should be on your app service, not the postgres service. leave postgres with no custom commands.
on your app service, try setting the start command to: /bin/sh -c "npx prisma migrate deploy && npm start"
the shell wrapper is needed otherwise the container exits after migrations finish. your build command looks fine as is