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 he...

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 执行相同的代码也没有问题

目录
相关文章
|
7月前
|
人工智能
Timeout on reading data from socket
Timeout on reading data from socket
63 3
|
4月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
131 0
|
6月前
|
Java 网络安全 Docker
curl: (56) Recv failure: Connection reset by peer
curl: (56) Recv failure: Connection reset by peer
340 0
|
6月前
Error from server error dialing backend remote error tls internal error
Error from server error dialing backend remote error tls internal error
44 0
|
Python
ConnectionResetError: [Errno 104] Connection reset by peer
ConnectionResetError: [Errno 104] Connection reset by peer
479 0
|
数据安全/隐私保护
记录curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决方案
关于这个错误其实遇到过好多次了,基本都是在每次换电脑之后执行
记录curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused解决方案
|
网络协议 Java
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
345 0
filebeat:Failed to publish events caused by: write tcp 5044: write: connection reset by peer
|
开发工具 git
git 报错 RPC failed; curl 18 transfer closed with outstanding read data remaining
这个错误是因为项目太久,tag资源文件太大 找了很久网上都说这样: 配置如下: $ git  config --global http.
8649 0
|
网络协议
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) anon free: munmap file alloc: mmap(MAP_SH...
3056 0
|
缓存 开发工具 git
Git报错Error:RPC failed; curl 18 transfer closed with outstanding read data remaining
Git报错Error:RPC failed; curl 18 transfer closed with outstanding read data remaining
356 0