试错版:https://blog.csdn.net/Jatham/article/details/84309497

待理解版:https://blog.51cto.com/tianshili/1909097


基本解决办法:

添加max_fails=1 fail_timeout=60s

nginx.conf文件内容如下:

    upstream risdz_server {

        server 192.168.10.211:8112;

        server 192.168.10.212:8112;

    }


修改后如下:

    upstream risdz_server {

        server 192.168.10.211:8112 max_fails=1 fail_timeout=60s;

        server 192.168.10.212:8112 max_fails=1 fail_timeout=60s;

    }