a year ago
My backend setup has been running smoothly for a while now and recently just stopped work without any interference on my end. After restarting the pg server all seems fine but it goes back after a bit of interaction, and currently even restarting it does nothing. I have tried connecting to it with available method like, Datagrip, sql, railway cli but still nothing the db seems to be working fine from the console but the issue still remains.
Here is the error when try to connect to it
psql: error: connection to server at "viaduct.proxy.rlwy.net" (35.212.103.87), port 45306 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
6 Replies
a year ago
I'm having the same type of issue. Can access database via connection string from my machine just fine, but the backend service running in my railway project can't connect to the database.
a year ago
One detail that may be relevant for troubleshooting is that it works fine in the build step, I have migrations that run at build time that go through just fine. It's once the application is running that the service cannot reach the database.
a year ago
Same error on my end. However, unlike @johnniehard, it's also failing during the build step for me.
a year ago
Same error here.
a year ago
Found another thread that might be relevant: https://help.railway.app/questions/trouble-connecting-to-postgre-sql-on-rail-df2cdf77
I tried adding a 3s timeout as is suggested in that thread, seems to be working fine for now. Feels quite hacky though. The application has been running fine for over a year without it, and runs fine without it in other environments.
Status changed to Solved railway[bot] • 11 months ago
a year ago
@johnniehard doesn't work for me. I'm trying connect with "railway connect *****"