nginx php 104,Nginx错误:recv() failed (104: Connection reset by peer) whi
Nginx错误:recv() failed (104: Connection reset by peer) while reading response header from upstream PHP : seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 5 total children
服务器上的两个网站都打不开了,包括这个博客。现在说下解决的流程
首先搜索了recv() failed (104: Connection reset by peer) while reading response header from upstream错误提示:
不要使用php-fpm的request_terminate_timeout, 最好设成request_terminate_timeout=0;这个参数会直接杀掉php进程,然后重启php进程,这样前端nginx就会返回104: Connection reset by peer。
首先编辑php-fpm.conf 默认路径:php5/etc/php-fpm.conf,搜索request_terminate_timeout 然后修改为0;
然后重启php-fpm kill -USR2 `cat /usr/local/php5/var/run/php-fpm.pid`
刷新网站,还是不行,基本一致loading,继续查看php错误日志。发现php没开启errorlog、
编辑php-fpm.conf 修改参数 error_log = /logs/php-fpm.log
重启php、刷新网站 查看php错误日志,有一条信息很多:WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 5 total children
大致意思是子进程超过了自己定义的最大值,
编辑php-fpm.conf 修改参数 pm.max_children = 100
然后重启php刷新网站,连接不上mysql了。不知道什么情况,ps aux|grep mysql 发现myqsl进程没有了。然后启动mysql
/etc/init.d/mysqld
再访问网站,回归正常
nginx php 104,Nginx错误:recv() failed (104: Connection reset by peer) whi相关推荐
- 错误:ssh_exchange_identification: read: connection reset by peer
问题:用公网连接内网的时候报错ssh_exchange_identification: read: connection reset by peer 问题判断:估计是在修改文件权限的时候不小心修改了/ ...
- nginx php 104,记一次nginx 502排错经历:recv() failed (104: Connection reset by peer)
开发了一个新项目,开发环境完全正常,部署至测试环境时,直接报502,换了几台测试机器,有正常的也有依然报502的-- 环境 开发.测试.生产环境均是CentOS 6.8的系统,Web环境是nginx+ ...
- recv() failed (104: Connection reset by peer) while reading response header from upstream
场景:为了得到用户在线等实时信息,在客户端做了个ajax轮训,每隔5秒请求一次: 用户量一上来,于是问题就来了,页面各种卡nginx日志文件 [root@iZt web]# tail -f /data ...
- 【Nignx】 nginx启动http服务,报错 curl: (56) Recv failure: Connection reset by peer
背景 docker 启动的nginx 服务,容器内端口80,映射到容器外8080,通过 curl -L -I http://xxxx:8080 报错 curl: (56) Recv failure: ...
- ab压测 apr_socket_recv: Connection reset by peer (104)错误解决方法
ab压测 apr_socket_recv: Connection reset by peer (104)错误解决方法 参考文章: (1)ab压测 apr_socket_recv: Connection ...
- error connection reset by peer 104
connection reset by peer的常见原因 1.服务器的并发连接数超过了其承载量,服务器会将其中一些连接关闭: 2. errno = 104错误表明你在对一个对端socket已经关闭的 ...
- <urlopen error [Errno 104] Connection reset by peer>
使用python写一个脚本调用接口时,报了这个错,在"urllib.request.urlopen(req, context=context)"这个方法中报错. 错误原因 发送的r ...
- GVM踩坑记录之:rsync: connection unexpectedly closed 和 rsync: read error: Connection reset by peer (104)
Kali 2021.2安装GVM(原OpenVAS)踩坑记录帖 在另一篇帖子安装GVM的过程中,遇到好多rsync报错 rsync: read error: Connection reset by p ...
- [Python] ConnectionResetError: [Errno 104] Connection reset by peer
python socket 编程,sftp远程读日志文件,取最后的30行返回.收到ConnectionResetError: [Errno 104] Connection reset by peer报 ...
最新文章
- 数据库 / 事务的 ACID
- 手把手教你pyqt中.qrc图片文件的编写和使用
- linux文件 内存映射 锁,linux – mmap:将映射文件立即加载到内存中吗?
- 10-30-010-安全简介-Kafka 安全机制
- 腾讯开工日1.5亿美元领投Reddit,美国贴吧最新估值30亿美元
- AI发来贺电,您的2333号奶牛已进入恋爱时节 | 野性的呼唤
- window服务器查看硬盘有几块,从多个远程Windows服务器获取磁盘空间信息
- RIP基础原理与实验
- proteus中ISIS软件的各种器件的添加
- 金橙子打标卡二次开发应用
- 【PyTorch深度学习项目实战100例】—— 基于ResNet101实现猴痘病毒识别任务 | 第31例
- 浏览器工作原理--浏览器中的页面循环系统
- SpringCloud高级应用(OpenFeign Ribbon Steam Sleuth+Zipkin)
- 2009 SD 2.0大会北京温都水城盛大召开(10月22日)
- 交换机端口mtu值最大_mtu出现网络故障案例
- Python办公自动化 2.1开发环境搭建:PyCharm社区版配置Anaconda开发环境
- Win10插了耳机电脑还是外放怎么办
- 黑马案例学成在线网页的实现
- Java——将汉字转为汉语拼音工具类
- Win7任务栏相关设置