3 months ago
I'm experiencing a connectivity issue between my API service and PostgreSQL database service on Railway, both deployed in the same project and environment (production).
Issue Details:
API Service: Running successfully, listening on port 4000
PostgreSQL Service: Running and ready to accept connections
Problem: API cannot connect to PostgreSQL at
postgres.railway.internal:5432Error:
PrismaClientInitializationError: Can't reach database server at postgres.railway.internal:####
What I've tried:
Restarted both services multiple times
Verified DATABASE_URL is correctly configured
Confirmed PostgreSQL logs show: "database system is ready to accept connections"
Both services are in the same project/environment
Verified all environment variables are set correctly
Expected behavior: API should be able to reach PostgreSQL on the private network
Current status: API and PostgreSQL are deployed but cannot communicate internally
Could this be a network isolation issue or a known problem? Is there anything I should check or reconfigure?
4 Replies
3 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Internal network connection issue - App cannot reach PostgreSQL via internal address
🧵 Urgent: PostgreSQL Connectivity Issue - "Connection reset by peer"
If you find the answer from one of these, please let us know by solving the thread!
3 months ago
Your setup looks correct. Are you able to consistently reproduce this or is it intermittent?
Status changed to Awaiting User Response Railway • 3 months ago
3 months ago
Same issue. And please stop closing threads that are describing this issue as solved. Clearly lots of folks are still having this problem
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
Hmmm, I'm looking at your most recent logs and it appears as though everything is functioning just fine now. Are you still having this issue? Would need some more info before I can debug.
Status changed to Awaiting User Response Railway • 3 months ago
3 months 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 • 3 months ago