We are using rails 4 and we are facing problem of 502 gateway error. Many time rails server automatically shut down and database connection (postgresql) disconnected.

1 comment
  • There are a ton of reasons why a Rails script could crash. You will need to review your logs or implement some error handling in your script to log these events. There are several ruby gems out there that will help you easily add logging and crash reporting to a ruby script. Without further information (a 502 error is just nginx saying that the Ruby process is no longer listening at the port where it is looking for it) it won’t be possible to narrow down a specific cause.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

This question was answered by @ryanpq:

There are a ton of reasons why a Rails script could crash. You will need to review your logs or implement some error handling in your script to log these events. There are several ruby gems out there that will help you easily add logging and crash reporting to a ruby script. Without further information (a 502 error is just nginx saying that the Ruby process is no longer listening at the port where it is looking for it) it won’t be possible to narrow down a specific cause.

View the original comment

Submit an Answer