2017年12月1日10:18:34

情景描述: 浏览器执行了一会儿, 报500错误

运行环境:  nginx + php-fpm

nginx日志:  recv() failed (104: Connection reset by peer) while reading response header from upstream

fpm日志:  fpm_request_check_timed_out(), line 146: child 2518, script '***/index.php' (pool www5) executing too slow (2.019546 sec), logging

查看 php-fpm 配置文件后, 发现脚本执行超时时间太短了, 修改为60s, 然后重启php,nginx环境, 就没问题了

像这样出现执行了一会儿又报错的, 可能的情况有

1. 域名解析有问题

2. 超时(脚本数据库操作太多, 时间太长)

3. 接口请求相互依赖导致的死等

有的会报502,并很快返回

调试到curl时出错, 版本 5.2.17,

本地环境出错(命令行执行: Segmentation fault ; 浏览器执行相同代码直接502, 但是找不到日志),

代码上传到测试环境(另一台PHP5.2的机器) 就不会报错了

PHP7 执行相同的代码也没有问题

recv() failed (104: Connection reset by peer) while reading response header from upstream的更多相关文章

  1. nginx recv() failed (104: Connection reset by peer) while reading response header from upstream解决方法

    首先说下 先看 按照ab 每秒请求的结果 看看 都有每秒能请求几个 如果并发量超出你请求的个数 会这样 所以一般图片和代码服务器最好分开 还有看看io瓶ding 和有没有延迟的PHP代码执行 0 先修 ...

  2. 转:get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer

    get value from agent failed: ZBX_TCP_READ() failed;[104] connection reset by peer zabbix都搭建好了,进行一下测试 ...

  3. nginx错误分析 `104: Connection reset by peer`

    故障描述 应用从虚拟机环境迁移到kubernetes环境中,有些应用不定时出现请求失败的情况,且应用没有记录任何日志,而在NGINX中记录502错误.我们查看了之前虚拟机中的访问情况,没有发现该问题. ...

  4. fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer

    问题:fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer 问题描述 通过mysql + sphinx ...

  5. 【Azure Redis 缓存】 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connection reset by peer"

    问题描述 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connecti ...

  6. Error -27780: [GENERAL_MSG_CAT_SSL_ERROR]connect to host "124.202.213.70" failed: [10054] Connection reset by peer [MsgId: MERR-27780]

    解决方案一: 备注: 此方案如果请求响应时间太长,勾选"WinInet replay instead of Sockets(Windows only)"将会导致如下错误:

  7. OGG-01232 Receive TCP params error: TCP/IP error 104 (Connection reset by peer), endpoint:

    源端: 2015-02-05 17:45:49 INFO OGG-01815 Virtual Memory Facilities for: COM anon alloc: mmap(MAP_ANON) ...

  8. java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

    java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

  9. urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

    http://www.dianping.com/shop/8010173 File "综合商场1.py", line 152, in <module>    httpC ...

随机推荐

  1. bzoj千题计划308:bzoj4589: Hard Nim(倍增FWT+生成函数)

    https://www.lydsy.com/JudgeOnline/problem.php?id=4589 n*m*m 做法 dp[i][j] 前i堆石子,异或和为j的方案数 第一重循环可以矩阵快速幂 ...

  2. 如何比较一个类型【模板使用】【sizeof用法】

    #include <iostream> using namespace std; void testEmptyClass(); struct Empty { }; struct Dummy ...

  3. Silverlight设计器——Path

    如下图,在设计一个InfoWindow的时候,顶栏的关闭按钮没有出现.观察了半天,也没有弄明白.无意中,拖动一个几乎透明的信息框,突然就出现了关闭的按钮.原来,那个信息框只是一个Path,它遮住了关闭 ...

  4. C#生成Guid,SqlServer生成Guid

    https://www.cnblogs.com/che109/p/6808143.html工作中需要用到全球唯一标识符,在.net当中 微软已经为我们添加了此方法,我们只需要直接调用即可.代码如下: ...

  5. linux上安装mysql,tomcat,jdk

    Linux 上安装 1 安装jdk 检测是否安装了jdk 运行 java –version 若有 需要将其卸载 a)         查看安装哪些jdk rmp –qa |grep java b)   ...

  6. echarts 导出图片,并将图片导出pdf格式

    1.官方下载echarts 包. 2.实例案例: 1)页面: <h2>Index</h2> <div id="main" style="he ...

  7. Linux 下磁盘挂载

    Linux 磁盘挂载 新硬盘挂载: fdisk /dev/sdb p # 打印分区 d # 删除分区 n # 创建分区,(一块硬盘最多4个主分区,扩展占一个主分区位置.p主分区 e扩展) w # 保存 ...

  8. MIME 类型

    关于读音 为了防止大家出去丢人,我先示范一下,MIME应该独坐[maim],听起来就好像“男人”的英语法人一样. 浏览器和MIME的关系 浏览器依靠MIME类型解释网页. 每当浏览器请求一个web页面 ...

  9. 单片机AT和STC区别

    http://www.21ic.com/jichuzhishi/datasheet/AT89C51/data/192017.html

  10. Centos7 nginx报错403 forbidden

    参考链接:http://www.cnblogs.com/chinway/archive/2017/08/14/7356239.html 因为安全性的考虑这个也是默认会出现的错误,因为SELinux的存 ...