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

Anonymous
PRO

11 days 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)

Awaiting User Response

1 Replies

11 days ago

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


Status changed to Awaiting User Response railway[bot] 11 days ago