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. Part-One

    首先,必须要声明一下,这个目录下的所有东西,是我对一本书复习,只是敲出部分代码让自己不至于眼高手低,其中有很多东西可能都是我的个人理解,如果有兴趣的朋友可以看一下,同时也欢迎大家指正. 1.Hello ...

  2. std::rotate使用

    1. 进行元素范围上的左旋转 first - 原范围的起始 n_first - 应出现在旋转后范围起始的元素 last - 原范围的结尾 原来:1 2 3 左旋转后(起始元素是2) : 2 3 1

  3. 使用Nginx在windows和linux上搭建集群

    Nginx Nginx (engine x) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器 特点:反向代理 负载均衡 动静分离… 反向代理(Reverse Pro ...

  4. 【U3d】场景加载-GameStart!

    目的:实现点击按钮场景切换 一共四个步骤,轻松食用(ง •̀_•́)ง 1. GameObject→UI→Button向开始场景中添加按钮,示例如下 2. 新建script——"LoadSc ...

  5. Docker(二)搭建和使用Docker

    摘自 https://mp.weixin.qq.com/s/E9tqhe00EjfV8y1pqWkZfw 一.Docker的架构 Docker使用C/S结构,即客户端/服务器体系结构.Docker客户 ...

  6. 隐马尔可夫模型HMM(一)

    摘自 1.李航的<统计学习方法> 2.https://www.cnblogs.com/pinard/p/6945257.html 了解HMM模型 1.隐马尔可夫模型的定义 隐马尔可夫模型是 ...

  7. c# 线程锁 ,

    using System; using System.Collections.Generic; using System.Text; using System.Threading; namespace ...

  8. mvc 导出execl

    mvc导出execl 必须是get方法才可以  也不能使用ajax function ComplaintsExport() { var serial = $("form").ser ...

  9. [C++]Linux之头文件sys/types.h[/usr/include/sys]

    1.查找<sys/types.h>文件 一般地,Linux的C头文件<sys/types.h>路径在如题的途径:/usr/include/sys下,然而博主[Linux For ...

  10. DNN-HMM

    <<DNN-HMM.docx>>