tengine 异常节点恢复慢,心跳时出现日志报错recv() failed (104: Connection reset by peer)

nmpmafwu  于 2021-12-26  发布在  Java
关注(0)|答案(0)|浏览(348)

Question

我在nginx1.16版本中添加nginx_upstream_check_module模块后。在两个节点的测试情况下,发现如果一个节点服务关闭,会按照正常的心跳周期和次数将异常节点切为down,但是我重启异常节点之后,是隔了很久恢复的节点才被切为UP。同时,发先每次心跳。nginx日志中就会出现recv() failed (104: Connection reset by peer)这的报错。

upstream com.10022 {
    check interval=3000 rise=4 fall=2 timeout=1000 default_down=true type=tcp;
    #check_keepalive_requests 1;
    #check_http_send "HEAD / HTTP/1.0\r\n\r\n";
    #check_http_expect_alive http_2xx http_3xx;
    server    xxxx1:10022 weight=1;
    server    xxxx:10022 weight=1;
}
server {
    listen       10022;
    server_name  com;
    location / {
        proxy_pass   http://com.10022;
        proxy_connect_timeout       10s;
        proxy_redirect off;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP  $remote_addr;
    }
    location /status {
        check_status;
        access_log   off;
    }
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题