A barrage of unexplained timeouts
normalperson at yhbt.net
Thu Aug 22 17:05:31 UTC 2013
nick at auger.net wrote:
> "Eric Wong" <normalperson at yhbt.net> said:
> > Jimmy Soho <jimmy.soho at gmail.com> wrote:
> >> Is a response send back by rails / unicorn fully buffered by nginx? Or
> >> is a unicorn worker blocked until the response is confirmed to have
> >> been successfully received by the client?
> > nginx fully buffers both requests and responses by default.
> > Which leads us to...
> >> Aside: how do you protect your unicorn workers against a barrage of
> >> client requests that eat the response veeeeeery sloooooooowly?
> > That's the whole point of using nginx with unicorn. nginx shields
> > unicorn from slow clients.
> Is it possible that the behavior could be related to nginx? Nginx
> hanging onto the connection too long from the worker, so that the
> worker never makes it back into the pool and eventually get's killed
> for not checking in?
Unlikely. That'd be a serious bug in nginx since nginx was originally
designed to do this buffering since the earliest versions. Which
version of nginx are you running? Can you be sure "proxy_buffering off"
is _not_ set anywhere?
More information about the mongrel-unicorn