环境介绍 
服务器: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. Mui - 全局css

    头部(mh) <header class="mui-bar mui-bar-nav"> <a class="mui-action-back mui-ic ...

  2. 使用AuthDBMType指令支持多种类似DBM的数据库

    Unix线程 在支持POSIX线程的Unix系统上,现在Apache能在混合的多进程.多线程模式下运行,使很多(但非全部)配置的可伸缩性得到了改善. 新的编译系统 重写了编译系统,现在是基于autoc ...

  3. Json 数据

    来自:极课学院 简介: json与xml json语法 json对象 json对象数组 用到的包 读取json数据例子 创建json数据

  4. php数组操作,删除第一个和最后一个元素

    对于一个php数组,该如何删除该数组的第一个元素或者最后一个元素呢?其实这两个过程都可以通过php自带的函数 array_pop 和 array_shift 来完成,下面就具体介绍一下如何来操作. ( ...

  5. [转]在VS2010 VC++项目中引用Lib静态库(以Openssl为例)

    本文转自:http://kb.cnblogs.com/page/94467/ Openssl是个为网络通信提供安全及数据完整性的一种安全协议,囊括了主要的密码算法.常用的密钥和证书封装管理功能以及SS ...

  6. c++ windows 获取mac地址

    c++ windows 获取mac地址 GetAdaptersInfo 用windows api获取mac地址和硬盘id编号 aa

  7. ThinkPHP验证码刷新随机数

    貌似因为IE的内核不支持重复,,所以要加个随机数..在代码中,,发现火狐的也不行..加了随机数后就可以了 <label class="img"><img id=& ...

  8. yii1.1.3主从(多从)、读写分离配置

    从新配置main.php片段 代码如下 ----------------------------------------------------------- 'db'=>array( 'con ...

  9. I方法 thinkphp

    function I($name,$default=null,$filter=null,$datas=null) { static $_PUT = null; $default_filter='htm ...

  10. 让Qt的无边框窗口支持拖拽、Aero Snap、窗口阴影等特性

    环境:Desktop Qt 5.4.1 MSVC2013 32bit 需要的库:dwmapi.lib .user32.lib 需要头文件:<dwmapi.h> .<windowsx. ...