#142 closed defect (fixed)
infinite loop until server fails in upstream module with round robin
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-module | Version: | 1.1.x |
Keywords: | round robin infinite loop | Cc: | |
uname -a: | Linux localhost.localdomain 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC 2010 i686 i686 i386 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.0.12
built by gcc 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) configure arguments: --with-debug --add-module=addon/jstatus --prefix=output |
Description
I use nginx as a load balancing for backend web server.
if this upstream has n servers,and m backup servers,and the n servers are not available(Connection refused),round robin will try n*max_fails times to connect to the n servers。but if there is no backup servers,round robin only try n times to the n servers.
such as:
upstream bdbk {
#no program listen on 8081,8082
server 127.0.0.1:8081 max_fails=3 fail_timeout=10s;
server 127.0.0.1:8082 max_fails=3 fail_timeout=10s;
server 127.0.0.1:8083 max_fails=3 fail_timeout=10s backup;
server 127.0.0.1:8084 max_fails=3 fail_timeout=10s backup;
}
if i make a request,upstream try 6(n*max_fails) to connect to 8081 8082 , then round robin try to connect to backup server.
if there is no backup servers。nginx only try 2(n) connect to 8081 8082。
Attachments (5)
Change History (7)
by , 13 years ago
Attachment: | nginx.conf added |
---|
by , 13 years ago
by , 13 years ago
by , 13 years ago
Attachment: | upstreams.list added |
---|
by , 13 years ago
Attachment: | access.log added |
---|
comment:1 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This a variation of #47.