Postgres crashing in looping
raulzitop
PROOP

a month ago

Hi team,

I'm currently facing a critical issue with my Postgres database. My disk got completely full, so I upgraded to the Pro plan and increased the volume size to 250GB. I also tried restoring a recent backup to get it running again.

However, the container keeps crashing almost instantly upon startup. I suspect that because the data is at 100% capacity, the database is crashing during the recovery/boot phase before your system has enough time to execute the volume resize script and recognize the new 250GB limit.

Here is the exact error log I am seeing in the panel right before it crashes:

2026-04-06 19:33:14.274 UTC [30] FATAL: could not write to file "pg_wal/xlogtemp.30": No space left on device

Project ID: 70db8bd8-c988-4016-9fb8-ea5a34a3ed11

Solved

5 Replies

a month ago

Hey, you can set your start command as sleep infinity, ssh into the container and clear WAL, an alternative is setting this as your start command, but I suggest you do a backup before:

bash -c 'rm -f /var/lib/postgresql/data/pgdata/postmaster.pid && runuser -u postgres -- pg_resetwal -f /var/lib/postgresql/data/pgdata && sleep 10 && exit 0'

If it logs: "Write-ahead log reset" you can remove the start command and redeploy to see if it works.


raulzitop
PROOP

a month ago

it works. Thanks !


a month ago

Did you SSH into the container or did you use the start command?


raulzitop
PROOP

a month ago

The start command with: bash -c 'rm -f /var/lib/postgresql/data/pgdata/postmaster.pid && runuser -u postgres -- pg_resetwal -f /var/lib/postgresql/data/pgdata && sleep 10 && exit 0'


a month ago

amazing! will mark this as solved


Status changed to Solved medim about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...