diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2011-08-18 16:52:38 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-08-18 16:52:38 +0000 |
commit | 624fbe94a23e183dc356f9c3e696a816cb67acc2 (patch) | |
tree | 5591c57365753efcf3c1686a1f531cc5252490fb /docs/xslt | |
parent | 9bc8fc4602fb2b39b6000fed060e185ffcf2571b (diff) | |
download | nginx-624fbe94a23e183dc356f9c3e696a816cb67acc2.tar.gz nginx-624fbe94a23e183dc356f9c3e696a816cb67acc2.zip |
Fixing cpu hog with all upstream servers marked "down".
The following configuration causes nginx to hog cpu due to infinite loop
in ngx_http_upstream_get_peer():
upstream backend {
server 127.0.0.1:8080 down;
server 127.0.0.1:8080 down;
}
server {
...
location / {
proxy_pass http://backend;
}
}
Make sure we don't loop infinitely in ngx_http_upstream_get_peer() but stop
after resetting peer weights once.
Return 0 if we are stuck. This is guaranteed to work as peer 0 always exists,
and eventually ngx_http_upstream_get_round_robin_peer() will do the right
thing falling back to backup servers or returning NGX_BUSY.
Diffstat (limited to 'docs/xslt')
0 files changed, 0 insertions, 0 deletions