nginx 502 504

针对压力测试的时候,接口出现的502 504问题,修改conf

1.upstream 添加 keepalive 256;
        upstream streamonwxyd {
                zone zoneonfile 64k;
                server wxyd.site.crias.com:8081  max_fails=1 fail_timeout=3s;

                 keepalive 256;
        }
2.location :添加
    proxy_set_header Connection "Keep-Alive";
    
        修改时间
  proxy_read_timeout 256s;

下面的地址,讲解的挺详细的

https://xiezefan.me/2017/09/27/nginx-502-bug-trace/

posted @ 2019-11-07 16:49  悟空一直飞  阅读(140)  评论(0编辑  收藏  举报