[error] * upstream timed out (110: Connection timed out) while reading response header from upstream

  • Posted July 19, 2013

So I recently deployed a Ruby on Rails app using Nginx, Unicorn, and Capistrano. Everything was working great (and I had used cap :deploy) to deploy changes. Made some recent changes to my site, deployed today and am getting these errors in my nginx/error.log

2013/07/19 19:05:16 [error] 21484#0: *8 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: , request: “GET / HTTP/1.1”, upstream: “http://unix:/tmp/unicorn.socialmath.sock:/”, host: “

I’ve tried google, but haven’t found anything that worked. Any thoughts on where to look for a fix or an idea for a fix? Thanks much in advance!


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

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.

I am sorry, I think I have the same issue as you. <br>But I still dont know how to fix it from your solutions. <br>Can you tell more about it?

Thanks. Had the same problem

You’re welcome, good to hear you solved it!

I fixed it with <br> <br>cap deploy:stop <br>cap deploy:start <br> <br>I think it has to do with unicorn looking at an old gem file or old routes (since I had updated my routes to the homepage) and now all is working. <br> <br>Thanks for your help! I learned what ps does in the command line and will be researching unicorn some more. I haven’t found a resource online that explains it in a way I can understand, but I’ll get it eventually. Thanks again!

Nothing from today in your log doesn’t have to mean if it’s running or not. One way to check for running processes is with ps. If your new unicorn I suggest you read it’s documentation a bit to get more familiar with it. (I’m no RoR man so can’t really help you with RoR/Unicorn specifics.)

I’m a total newb to this. How do I check if unicorn is running? <br> <br>The unicorn log files have nothing except from July 17 when I initially generated anything. I assume that means that something is not working with unicorn since it’s not logging anything from today.

Can you confirm Unicorn is running? Also check your Unicorn log files for issies.