A barrage of unexplained timeouts

Eric Wong normalperson at yhbt.net
Tue Aug 20 17:40:18 UTC 2013


nick at auger.net wrote:
> "Eric Wong" <normalperson at yhbt.net> said:
> > Can you take a look at the nginx error and access logs?  From what
> > you're saying, there's a chance a request never even got to the Rails
> > layer.  However, nginx should be logging failed/long-running requests to
> > unicorn.
> 
> The nginx access logs show frequent 499 responses.  The error logs are filled with:
> 
> connect() failed (110: Connection timed out) while connecting to upstream
> upstream timed out (110: Connection timed out) while reading response header from upstream
> 
> What specific pieces of information should I be looking for in the logs?

Do you have any other requests in your logs which could be taking
a long time and hogging workers, but not high enough to trigger the
unicorn kill timeout.

(enable $request_time in nginx access logs if you haven't already)

Is this with Unix or TCP sockets?  If it's over a LAN, maybe there's
still a bad switch/port/cable somewhere (that happens often to me).

With Unix sockets, I don't recall encountering recent problems under
Linux.  Which OS are you running?

I hit several TCP bugs in the early 3.7 Linux kernels, too...


More information about the mongrel-unicorn mailing list