首页 > 其他 > 详细

fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer

时间:2019-11-02 17:14:20      阅读:349      评论:0      收藏:0      [点我收藏+]

问题:fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer

问题描述

通过mysql + sphinx做的一个检索功能,之前一直没什么问题,最近检索时有部分检索失败,查看日志后报错为 fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer。

 

问题分析

查看代码部分,fwrite() 打开的资源为fsockopen(),通过fsockopen连接sphinx,将数据写入到sphinx服务端。

最终发现问题出在sphinx服务端,由于检索的数据太大,在请求sphinx服务端时,发送的包数据超过了sphinx可接受的最大值,导致以上问题。

 

解决方法

修改sphinx.conf中max_packet_size(最大允许的网络包大小)的设置值以解决问题。

 

fwrite(): send of 8192 bytes failed with errno=104 Connection reset by peer

原文:https://www.cnblogs.com/it-june/p/11782234.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!