21 days ago
Hi everyone,
My PostgreSQL service on Railway suddenly stopped accepting connections, both from internal services and external clients. It was working perfectly fine before, and nothing has changed in my configuration or environment variables.
I get repeated messages like:
could not receive data from client: Connection reset by peer
My application logs (Python + asyncpg) show:
TimeoutError during asyncpg.create_pool()
asyncio.exceptions.CancelledError
Connections from inside the Railway network (e.g. other services in the same project) and from outside both hang and eventually time out.
I’ve already tried:
Restarting my application services
Verifying credentials and connection URLs
Waiting in case it was a transient issue
But the database is still unreachable even though it appears to start normally.
It looks similar to some of the recent “TCP Proxy for PostgreSQL not accepting connections” threads, except in my case internal connections also fail, so it seems like a deeper networking or container issue.
Plese help!!! This is my production database
3 Replies
21 days ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Urgent: PostgreSQL Connectivity Issue - "Connection reset by peer"
🧵 Could not receive data from client: Connection reset by peer
🧵 Posgresql cant connect without sslmode=disable inside railway
If you find the answer from one of these, please let us know by solving the thread!
21 days ago
The connection is super unstable, some requests timeout, others don't, it looks like a network connection stability problem
21 days ago
After trying everything, the only thing that worked was creating a backup and then restoring from that backup. Simple redeploys didn't work.
Status changed to Solved brody • 21 days ago