工作总结28 Nginx性能调优一nginx proxy超时报错 upstream timed out (110: Connec.

来源:互联网 发布:软件生命周期模型比较 编辑:程序博客网 时间:2024/06/07 02:02

环境介绍 
服务器:centos7.0 X64
服务:nginx proxy

问题描述:

查找日志提示如下

 upstream timed out (110: Connect....

 解决方法:

原因在于nginx proxy的超时时间太短
proxy_connect_timeout    60;
proxy_read_timeout       60;
proxy_send_timeout       60;

更改为

proxy_connect_timeout    600;
proxy_read_timeout       600;
proxy_send_timeout       600;

客户端那边不间断的测试数据导致,对于这种情况,可以对nginx的配置文件进行配置以下参数来进行不主动关闭。

1
proxy_ignore_client_abort on;

“no live upstreams while connecting to upstream 

max_fails 允许请求失败的次数默认为1.设为0则表示关闭该项功能,当超过最大次数时,返回proxy_next_upstream 模块定义的错误

然后重启nginx即可 ./nginx -s reload

1 0
原创粉丝点击