10 days ago
Hi Railway Support,
I’m experiencing a persistent issue connecting my backend service to my Postgres database in the same project/environment (couve-backend, staging). Here’s a summary of the situation:
Postgres service is healthy and “ready to accept connections.”
I can connect and create tables using the public proxy (mainline.proxy.rlwy.net:55779) from my local machine.
The backend service in Railway fails to connect using the internal address (postgres.railway.internal:5432) with the error:
Error: P1001: Can't reach database server at postgres.railway.internal:5432
DATABASE_URL is set to ${{ Postgres.DATABASE_URL }} in the backend service variables.
Both services are in the same project and environment.
In the Architecture tab, there is only a dotted line (variable reference) between the backend and Postgres, not a solid line (true dependency).
The UI does not offer an option to add a true dependency or connect the services for private networking.
Restarting both services and redeploying does not resolve the issue.
No password or port mismatch, and no hardcoded URLs.
Is there a way to enable a true dependency (solid line) for private network access between my backend and Postgres? Or is there a platform/networking issue affecting my project?
Thank you for your help!
1 Replies
10 days ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Railway Support Request - Internal Database Connection Failure
🧵 Unable to Connect to postgres.railway.internal (Connection Timed Out)
If you find the answer from one of these, please let us know by solving the thread!