Mercurial > hg > nginx-quic
annotate docs/xsls/directive.xsls @ 4010:74a93d3fdd85
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 18 Aug 2011 16:52:38 +0000 |
parents | fc808f006ff4 |
children | ac19e755a132 |
rev | line source |
---|---|
3996
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
1 X:stylesheet { |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
2 |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
3 X:template = "directive" { |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 <a name="{@name}" /> <center><h4> !{@name} </h4></center> |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 !! "syntax"; |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
6 !! "default"; |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 !! "context"; |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 !! "para"; |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 } |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 X:template = "syntax" { X:text {syntax: } !!; <br/> } |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 X:template = "default" { X:text {default: } !!; <br/> } |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 X:template = "context" { X:text {context: } !!; <br/> } |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
fc808f006ff4
skeleton for documentation processing
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 } |