环境介绍 
服务器:centos6.5
服务:nginx proxy

问题描述:

压测 开发同事 的开发环境项目没事,但是 线上机器 命中%50 ,大量502

php的某些页面打不开,页面提示gateway timeout,然后查找日志提示如下

2015/09/19 14:00:30 [error] 1811#0: *319 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 58.38.218.159, server: www.iserver.com, request: "GET /invrenjie/image_new/myfiona/120913/MY-1263/mins021_950.jpg HTTP/1.1", upstream: "http://server:80/invrenjie/image_new/myfiona/120913/MY-1263/mins021_950.jpg", host: "www.server.com"

解决方法:
原因在于nginx proxy的超时时间太短
proxy_connect_timeout    60;
proxy_read_timeout       600;
proxy_send_timeout       600;

更改为

proxy_connect_timeout    600;
proxy_read_timeout       600;
proxy_send_timeout       600;

然后重启nginx即可

压测 502 日志报错 upstream timed out (110: Connection timed out)的更多相关文章

  1. Nginx报错:upstream timed out (110: Connection timed out)和client intended to send too large body【转】

    nginx日志报错 2018/01/26 16:36:49 [error] 23327#0: *54953 upstream timed out (110: Connection timed out) ...

  2. xdebug 一直报错 upstream timed out (110: Connection timed out) while reading response header from upstream

    本地主机(Windows环境192.168.66.1)访问虚拟机(192.168.66.139)里面的搭建的php环境(系统centos6.5版本,php版本是5.5.30 ,xdebug 2.4.0 ...

  3. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

  4. nginx 报错 upstream timed out (110: Connection timed out)解决方案

    nginx 作PHP的web接口服务器. 在线上发现时不时经常崩溃.504,导致接口访问无响应回复. 查看日志: [error] 11618#0: *324911 upstream timed out ...

  5. upstream timed out (110: Connection timed out) while reading response header from upstream, client:

    遇到的问题 之前没配置下面这段,访问时候偶尔会出现 504 gateway timeout,由于偶尔出现,所以不太好排查 proxy_connect_timeout 300s;proxy_read_t ...

  6. upstream timed out (110: Connection timed out) while reading response header from upstream

    Nginx报错日志有如下内容: upstream timed out (110: Connection timed out) while reading response header from up ...

  7. Nginx Upstream timed out (110: Connection timed out)

    Nginx Upstream timed out (110: Connection timed out) – 运维生存时间 http://www.ttlsa.com/nginx/nginx-upstr ...

  8. nginx 超时问题: upstream timed out (110: Connection timed out) while reading response header from upstream

    目录 错误内容 错误原因 错误解决办法 错误内容 我们可以在error.log 里面可以看到 错误内容:upstream timed out (110: Connection timed out) w ...

  9. ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect

    ssh项目启动报错: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection t ...

随机推荐

  1. 那些年我们没能bypass的xss filter

    个人很喜欢收集xss payload.在这里把自己平时挖xss时会用到的payloads列出来和大家一起分享.很希望大家能把自己的一些payload也分享出来.(由于 我是linux党,所以本文出现在 ...

  2. Eclipse代码提示功能是不是利用反射

    希望看到这个空文章的你能够说说你的意见………………

  3. IIS 301 跳转

    IIS设置301重定向 IIS服务器下做301永久重定向设置方法. IIS6设置301重定向: 1.新建一个站点,对应目录如E:\wwwroot\301web.该目录下只需要1个文件,即index.h ...

  4. [转]ASP.NET会话(Session)保存模式

    本文转自:http://blog.csdn.net/cityhunter172/article/details/727743 作者:寒羽枫(cityhunter172) 大家好,已有四个多月没写东东啦 ...

  5. System-Defined Device Setup Classes Available to Vendors

    https://msdn.microsoft.com/en-us/library/windows/hardware/ff553426(v=vs.85).aspx

  6. DS实验题 order

    算法与数据结构 实验题 6.4 order ★实验任务 给出一棵二叉树的中序遍历和每个节点的父节点,求这棵二叉树的先序和后序遍历. ★数据输入 输入第一行为一个正整数n表示二叉树的节点数目,节点编号从 ...

  7. Nginx 报错: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory) 的解决方法

    今天测试域名访问不了,登陆 Linux(Ubuntu)重启Nginx: nginx -s reload 结果报错: nginx: [error] open() : No such file or di ...

  8. 获取checkbox复选框的值

    <title>CheckBox</title> <script type = "text/javascript"> doGetVal: func ...

  9. CentOS上安装Node.js

    CentOS上安装Node.js [日期:2014-07-21] 来源:Linux社区  作者:maskdfe [字体:大 中 小]     CentOS上安装Node.js(想在Linux上学习No ...

  10. 1、C到C++安全性增强

    1.C语言 #include <stdio.h> int main(void) { const int a = 10; //在C语言里这里不赋值可以编译的过去,但是这里不初始化以后就没办法 ...