环境介绍 
服务器: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. sonarqube  安装配置

    http:// www.sonarqube.org MySQL Unsupported mysql version: 5.5. Minimal supported version is 5.6. Th ...

  2. PAT (Top Level) Practise 1008 Airline Routes(Tarjan模版题)

    1008. Airline Routes (35) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue Given a ...

  3. ASP.NET\ASP.NET MVC表单提交遇到的问题结论

    同步提交的两种基本方式 1,用type=“submit”按钮.form没有必要runat=“server” <form method="post" action=" ...

  4. [ZZ] HDR&ToneMapping

    http://blog.csdn.net/toughbro/article/details/6745207 float游戏存储照片blogimage HDR high dynamic range. 很 ...

  5. Linux 每天自动备份mysql数据库的方法

    Linux 每天自动备份mysql数据库的方法 作者: 字体:[增加 减小] 类型:转载   linux下为了安全有时候需要自动备份mysql数据库,下面是具体的实现步骤.   /usr/bin为my ...

  6. 放到u-boot/arch/arm/inlcude下面解压A20固件库制作笔记

    运行 build_dragonboard.sh,完成一次编译,首次编译需要消耗 20 分钟以上的时间.这里包括编译bootloader.kernel.rootfs. 修改 Linux 内核配置$ cd ...

  7. powershell 批量生成文件

    缘由 由于现在替省厅工作,年底了要向地市收很多文件,哪些地市已报,哪些没报,需要一目了然. 我的处理方式是收什么文件就针对该文件新建一个目录,然后在该目录下为所有地市建一个占位文件. 等收到项某市的材 ...

  8. the essence of the internet idea

    Computer Systems A Programmer's Perspective Second Edition Of course, we are glossing over many diff ...

  9. ①spirngMVC框架运行原理图

  10. Java高级之线程同步

    本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 关于实现多线程的意义,"从业四年看并发"一文已经讲述,而本篇主要讲一下常用的设计 ...