a month ago
My gapperut_db (Postgres 18) service shows "Online" but is completely unreachable from:
- My app (gapperut)
- VS Code
- Railway UI
Latest deployment logs show permission errors during startup:
- collation-refresh: psql: error: /tmp/collation-refresh.K6Uuzm.sql: Permission denied
- database system was not properly shut down; automatic recovery in progress
Connection attempts timeout indefinitely. Redeploying didn't fix it.
Service: gapperut_db (ghcr.io/railwayapp-templates/postgres-ssl:18)
Project: geperuts_app
Environment: production (EU West)
1 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
The /tmp folder inside the container lost write permissions, causing Railway's startup script (collation-refresh.sql) to crash silently. The container stays 'Online', but Postgres gets stuck recovering in a loop and never opens its connection port.
Fix: Add DEBUG_MODE=true in environment variables to access Railway's container terminal, run chmod 1777 /tmp to restore write permissions, then remove the variable and redeploy.