]> git.kaiwu.me - nginx.git/commit
Workaround for cpu hog on errors with cached connections.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 15 Sep 2011 18:12:58 +0000 (18:12 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 15 Sep 2011 18:12:58 +0000 (18:12 +0000)
commitc42c70f478b4ec1a153b77129fd3e905f5b74314
tree126224fc10f2d4dcfa4f5c42917d644b2a40ea88
parentd7c2673d3ffb5c8c7c994a3ee385997237ed0d99
Workaround for cpu hog on errors with cached connections.

Just doing another connect isn't safe as peer.get() may expect peer.tries
to be strictly positive (this is the case e.g. with round robin with multiple
upstream servers).  Increment peer.tries to at least avoid cpu hog in
round robin balancer (with the patch alert will be seen instead).

This is not enough to fully address the problem though, hence TODO.  We
should be able to inform balancer that the error wasn't considered fatal
and it may make sense to retry the same peer.
src/http/ngx_http_upstream.c