Crashing deployment
gadgetmies
HOBBYOP

2 years ago

I have had a service running on Railway for some time already and previously have not had any issues. Recently (in the past months) I have started getting the following error:"[error] uncaughtException: connect EHOSTUNREACH 35.212.181.xxx:39579

  No stack trace"

The IP and port seem to match with the Railway PostgreSQL database the service is using. I assume that it is natural that there sometimes are connection issues, but I don't quite understand why I get the "deployment crashed" error and why the service is stopped.

I am not sure how I could fix the issue and prevent the service from going down all the time. Could you perhaps provide instructions on how to debug and fix the issue?

Solved

6 Replies

zuchka
PRO

2 years ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.


gadgetmies
HOBBYOP

a year ago

Anyone got any ideas on how to fix this? I changed the "Number of times to try and restart the service if it stopped due to an error" to 1000 to prevent stopping the service after the connection issues. I cannot recall any change to the application that would explain why I have recently started getting these connection errors. It seems that in the last 24 hours the service has restarted tens of times because of connection issues.

I know I could probably add some retry logic to the service to prevent it from restarting when the database connection is lost, but I'd prefer not to add any such logic as disconnection from the database is a critical issue and restarting the service on such events feels like the correct course of action.


brody
EMPLOYEE

a year ago

This is a common occurrence on the legacy runtime, as long as your service doesn't have a volume you can switch to the v2 runtime in your service settings, so far I haven't heard back from anyone who has had that error and switched to the v2 runtime.

I'm also terribly sorry that this wasn't answered sooner, the system sends an automated message as the user who made the thread public, but it sends that message before actually making the thread public, so as far as I knew this was still a private thread when Matt made it public, until you messaged so that the notification changed to indicate that this was a public thread.


gadgetmies
HOBBYOP

a year ago

Thank you for the reply! I now updated to the v2 runtime. I hope it will resolve the issues. Anyway, I'll post a new message in a few days to update on the situation.


brody
EMPLOYEE

a year ago

Sounds good! Just remember if you have a volume you will not be on the V2 runtime despite what the selector says.

Again sorry for the delay, I have asked a team member to make the change to have the thread made public before the message is sent.


gadgetmies
HOBBYOP

a year ago

The service has now been running for a good while without any issues. Thank you for the help!


Status changed to Solved Railway over 1 year ago


Loading...