Question

Why Rails server getting shut down automatically?

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.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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