Question

504 Gateway Time-out for Rails Application with Ubuntu, NGINX and Unicorn

I’m trying to deploy my first RoR app. I installed PostgreSQL, created database, cloned source code, bundled it and applied migrations. But I’ve got “We’re sorry, but something went wrong”. So I’ve decided to reboot it using DO instruction for safety rebooting. And now I’m getting 504 Gateway Time-out

Here is nginx error.log’s tail

https://gist.github.com/femalemoustache/13089aad6c21f1e5934e

Here is unicorn.log’s tail

https://gist.github.com/femalemoustache/3d6485b2586624154a42

What to do?

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.

Did you ever figure this out? I am running into this as well.

This comment has been deleted

Edit your /etc/nginx/nginx.conf and alter those parameters in the ‘http’ section (set timeouts according to your needs): send_timeout 120; proxy_read_timeout 120; proxy_connect_timeout 120;

and then restart nginx (service nginx reload)

that variables respond to gateway time limit, if it doesnt help - increase numbers