recv() failed (104: Connection reset by peer) while reading response header from upstream
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的更多相关文章
- nginx recv() failed (104: Connection reset by peer) while reading response header from upstream解决方法
首先说下 先看 按照ab 每秒请求的结果 看看 都有每秒能请求几个 如果并发量超出你请求的个数 会这样 所以一般图片和代码服务器最好分开 还有看看io瓶ding 和有没有延迟的PHP代码执行 0 先修 ...
- 转: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都搭建好了,进行一下测试 ...
- nginx错误分析 `104: Connection reset by peer`
故障描述 应用从虚拟机环境迁移到kubernetes环境中,有些应用不定时出现请求失败的情况,且应用没有记录任何日志,而在NGINX中记录502错误.我们查看了之前虚拟机中的访问情况,没有发现该问题. ...
- 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 ...
- 【Azure Redis 缓存】 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connection reset by peer"
问题描述 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connecti ...
- 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)"将会导致如下错误:
- 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) ...
- java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
- urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>
http://www.dianping.com/shop/8010173 File "综合商场1.py", line 152, in <module> httpC ...
随机推荐
- golang 缓冲区的终端输入
bufio包实现了有缓冲的I/O.它包装一个io.Reader或io.Writer接口对象,os.stdin就是实现了这个接口 package main import ( "bufio&qu ...
- bzoj千题计划315:bzoj3172: [Tjoi2013]单词(AC自动机)
https://www.lydsy.com/JudgeOnline/problem.php?id=3172 构建AC自动机 在fail树上,点i的子树大小 表示trie树上根节点到i构成的单词 是 多 ...
- Spring Boot 2程序不能加载 com.mysql.jdbc.Driver 问题
用Spring Boot Starter 向导生成了一个很简单SpringBoot程序, 用到了 MySQL, 总是下面不能加载 Mysql driver class 错误. Cannot load ...
- GBK 字符集
什么是 GBK ? 中文名 汉字编码字符集 外文名 Chinese Internal Code Specification 全 称 <汉字内码扩展规范> GBK编码,是对GB2312 ...
- SQL Server进阶 遍历表的几种方法
https://www.cnblogs.com/mcgrady/p/4182486.html
- Android手机特殊软件配置
1. 安装360一键root http://root.360.cn/ 2.安装SSHdroid 用于启用手机的ssh 地址:https://www.apk20.com/apk/77332/v/7346 ...
- List、Map、set的加载因子,默认初始容量和扩容增量
首先,这三个概念说下.初始大小,就是创建时可容纳的默认元素个数:加载因子,表示某个阀值,用0~1之间的小数来表示,当已有元素占比达到这个阀值后,底层将进行扩容操作:扩容方式,即指定每次扩容后的大小的规 ...
- 字符设备驱动(二)---key的使用:查询方式
---恢复内容开始--- 一.硬件电路 1.1 电路原理图 S1-S5共5个按键,其中,S2-S4为中断按键,S1为复位按键.S1直接为硬件复位电路,并不需要我们写进驱动. 单片机接口如下图: 由图中 ...
- 【51nod 1331】狭窄的通道
Description 有一个长为L的狭窄通道,我们假设这个通道在x轴上,其两个出口分别在x=0与x=L处.在这个通道里有N只狼,第i只狼有一个初始位置ai,它想到达位置bi(0<=i<N ...
- tensorflow--logistic regression
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist=input_data. ...