7 days ago
roject: contextos-backend (id: 9d1fd8bc-bda6-45cb-8082-3e3455694b89)
Service: Postgres (id: bddc3d20-4b75-4d06-a581-995bf74bfdf0)
Environment: production
Postgres on this service is rejecting all external connections with FATAL: password authentication failed for user "postgres". Diagnosis so far:
POSTGRES_PASSWORD in Variables tab matches the password component embedded in DATABASE_PUBLIC_URL. Railway's published credentials are internally consistent.
Connections worked normally earlier today, then started failing around [insert your approximate UTC timestamp of first failure]. No password rotation was performed on my side.
Redeployed the Postgres service (deployment id: [grab from the latest deployment row]). Auth still fails with the same error.
The TCP proxy at shinkansen.proxy.rlwy.net:47600 is reachable and responsive (Postgres returns FATAL, not a network error), so this is specifically a credential rejection by the Postgres pod, not a proxy or network issue.
The dashboard's own Database tab can read tables fine, so an admin-level connection path exists internally.
Hypothesis: the password stored in pg_authid on the persistent volume has diverged from POSTGRES_PASSWORD env var. Standard Postgres docker behavior is to only honor POSTGRES_PASSWORD during initdb on first volume mount, so subsequent env var changes don't update the stored password.
Requested action: either reset the stored Postgres credentials to match the env var, or provide a path for me to run ALTER USER postgres WITH PASSWORD '...' against this instance.
1 Replies
7 days ago
Your hypothesis is correct - the Postgres Docker image only applies POSTGRES_PASSWORD during initial initdb, so the password stored on the volume can diverge from the env var. Open your Postgres service panel and go to the Credentials tab, which lets you regenerate the password in a way that updates both the database and the environment variables in sync (docs). After regenerating, manually redeploy any dependent services so they pick up the new connection string.
Status changed to Awaiting User Response Railway • 7 days ago
3 hours 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 3 hours ago