yaoweibin / nginx_upstream_check_module

Health checks upstreams for nginx
http://github.com/yaoweibin/nginx_upstream_check_module
2.02k stars 478 forks source link

rise数不累加 #268

Open lengyuxuan888 opened 1 year ago

lengyuxuan888 commented 1 year ago

upstream aa.test.com { server xx.xx.xx.xx:80; check interval=1000 rise=2 fall=2 timeout=1000 type=http; check_keepalive_requests 200; check_http_send "GET /xx.html HTTP/1.1\r\nConnection: close\r\nHost: aa.test.com\r\n\r\n"; check_http_expect_alive http_2xx http_3xx; } 当我设置check_keepalive_requests 200;时候,rise数不累加,导致后端服务器down了后,不会摘除,如果设置为1的话,就正常。 nginx从nginx-1.20到nginx-1.25都试了,都不行。

sudocodus commented 1 year ago

为什么要设置200,什么场景?

wklken commented 3 months ago

遇到同样的问题,跟 check_keepalive_requests 没关系,注释掉会发现服务恢复后,rise数始终是 1,导致恢复后节点不会变成up

wklken commented 3 months ago

https://github.com/yaoweibin/nginx_upstream_check_module/issues/232

原因: nginx配置的 worker_processes 1; 导致的

似乎必须 rise <= worker_processes