2KB项目,专业的源码交易网站 帮助 收藏 每日签到

Nginx错误:recv() failed (104: Connection reset by peer) while reading response header

  • 时间:2019-07-22 21:42 编辑:Joe Brennan 来源:2KB项目 阅读:1223
  • 扫一扫,手机访问
  • 分享
摘要:recv()failed(104:Connectionresetbypeer)whilereadingresponseheaderfromupstream,client:120.229.48.101,server:www.2kb.com,request:不要使用php-fpm的request_terminate_timeout,最好设成request_terminate_timeout=0;vi /etc/php-f
recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 120.229.48.101, server: www.2kb.com, request:

 

不要使用php-fpm的request_terminate_timeout, 最好设成request_terminate_timeout=0; 

 

vi /etc/php-fpm.d/www.2kb.com.conf (默认:/usr/local/php/etc/php-fpm.conf)

修改为:

 

; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the ‘max_execution_time’ ini option
; does not stop script execution for some reason. A value of ’0′ means ‘off’.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
request_terminate_timeout = 0

这个参数会杀掉php进程,重启php进程,这样前端nginx就会返回104: Connection reset by peer。这个过程是很慢,总体感觉就是网站很卡。

重启 php-fpm 和 Nginx 一切正常。

 

service nginx restart (/usr/local/nginx/sbin/nginx -s stop;/usr/local/nginx/sbin/nginx;)


重启一下php-fpm

/etc/init.d/php-fpm restart 

再打开就OK了。



2KB项目(www.2kb.com,源码交易平台),提供担保交易、源码交易、虚拟商品、在家创业、在线创业、任务交易、网站设计、软件设计、网络兼职、站长交易、域名交易、链接买卖、网站交易、广告买卖、站长培训、建站美工等服务

  • 全部评论(0)
资讯详情页最新发布上方横幅
最新发布的资讯信息
【计算机/互联网|】Nginx出现502错误(2020-01-20 21:02)
【计算机/互联网|】网站运营全智能软手V0.1版发布(2020-01-20 12:16)
【计算机/互联网|】淘宝这是怎么了?(2020-01-19 19:15)
【行业动态|】谷歌关闭小米智能摄像头,因为窃听器显示了陌生人家中的照片(2020-01-15 09:42)
【行业动态|】据报道谷歌新闻终止了数字杂志,退还主动订阅(2020-01-15 09:39)
【行业动态|】康佳将OLED电视带到美国与LG和索尼竞争(2020-01-15 09:38)
【行业动态|】2020年最佳AV接收机(2020-01-15 09:35)
【行业动态|】2020年最佳流媒体设备:Roku,Apple TV,Firebar,Chromecast等(2020-01-15 09:31)
【行业动态|】CES 2020预览:更多的流媒体服务和订阅即将到来(2020-01-08 21:41)
【行业动态|】从埃隆·马斯克到杰夫·贝佐斯,这30位人物定义了2010年代(2020-01-01 15:14)
联系我们

Q Q: 7090832

电话:400-0011-990

邮箱:7090832@qq.com

时间:9:00-23:00

联系客服
商家入住 服务咨询 投拆建议 联系客服
0577-67068160
手机版

扫一扫进手机版
返回顶部