R
Railway2mo ago
caelin

522 Bad Gateway with no logs

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
No description
Solution:
502 means your app has not responded to the incoming request
Jump to solution
10 Replies
Percy
Percy2mo ago
Project ID: 93bdb69d-3975-4e76-bc29-f940b0028664
caelin
caelinOP2mo ago
93bdb69d-3975-4e76-bc29-f940b0028664
Solution
Brody
Brody2mo ago
502 means your app has not responded to the incoming request
caelin
caelinOP2mo ago
Are there any additional logs in this service? The last thing we see is a successful request completion
Brody
Brody2mo ago
you can check the HTTP logs for your http logs as for deploy logs, whatever your app logs will be there, so if there is something missing its because the app lacks verbose logging im also seeing a lot of 500 logs, so something is going wrong with your application lately you can filter for a specific status code with @httpStatus:500 (replace 500 with your desired code)
caelin
caelinOP2mo ago
Is there a way to auto-restart containers?
Brody
Brody2mo ago
by default railway will restart up to 10 times when your app crashes, is that not what you are looking for?
caelin
caelinOP2mo ago
Is there a way to trigger it off a healthcheck?
Brody
Brody2mo ago
nothing railway native, you would need to write code that interacts with the API to do that but that is not a productive use of time, time would be better spent fixing the root issue with your app
caelin
caelinOP2mo ago
Right - thanks for the help
Want results from more Discord servers?
Add your server