522 Bad Gateway with no logs
caelinsutch
PROOP

a year ago

We've had a nodejs based docker service failing silently with a 502 bad gateway error for the last day or two randomly. While i'm not 100% sure it's origin is Railway, the code itself hasn't changed in a few days but the service has crashed multiple times in the last 24 hours seemingly at random

13 Replies

caelinsutch
PROOP

a year ago

93bdb69d-3975-4e76-bc29-f940b0028664


a year ago

502 means your app has not responded to the incoming request


caelinsutch
PROOP

a year ago

Are there any additional logs in this service? The last thing we see is a successful request completion


a year ago

you can check the HTTP logs for your http logs


a year ago

as for deploy logs, whatever your app logs will be there, so if there is something missing its because the app lacks verbose logging


a year ago

im also seeing a lot of 500 logs, so something is going wrong with your application lately


a year ago

you can filter for a specific status code with @httpStatus:500 (replace 500 with your desired code)


caelinsutch
PROOP

a year ago

Is there a way to auto-restart containers?


a year ago

by default railway will restart up to 10 times when your app crashes, is that not what you are looking for?


caelinsutch
PROOP

a year ago

Is there a way to trigger it off a healthcheck?


a year ago

nothing railway native, you would need to write code that interacts with the API to do that


a year ago

but that is not a productive use of time, time would be better spent fixing the root issue with your app


caelinsutch
PROOP

a year ago

Right - thanks for the help


Loading...