PostgreSQL Deployment Stuck: Repeated "invalid length of startup packet" errors and Healthcheck failing

Anonymous
PRO

3 months ago

Hello Railway Support,

We are currently facing a critical issue with our PostgreSQL deployment on Railway.
After every deployment attempt, the Postgres container starts but remains stuck with continuous log messages like:
LOG: invalid length of startup packet

This repeats endlessly every few seconds.

Before that, the logs also show:
database system was not properly shut down; automatic recovery in progress

invalid record length at ...

redo starts at ...
Finally, the deployment fails during the healthcheck stage and the container stops.

Tried setting custom startup command:
/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"

Restored from backup

Redeployed the service multiple times
Checked network configs (we're using Railway Private Networking)

Solved

1 Replies

3 months ago

Appears your Postgres is up and running. Is this no longer an issue?


Status changed to Awaiting User Response Railway 3 months ago


Railway
BOT

a month ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway about 1 month ago