问题: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的更多相关文章

  1. urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

    http://www.dianping.com/shop/8010173 File "综合商场1.py", line 152, in <module>    httpC ...

  2. celery使用rabbitmq报错[Errno 104] Connection reset by peer.

    写好celery任务文件,使用celery -A app worker --loglevel=info启动时,报告如下错误: [2019-01-29 01:19:26,680: ERROR/MainP ...

  3. Python 频繁请求问题: [Errno 104] Connection reset by peer

    Table of Contents 1. 记遇到的一个问题:[Errno 104] Connection reset by peer 记遇到的一个问题:[Errno 104] Connection r ...

  4. python requests [Errno 104] Connection reset by peer

    有个需求,数据库有个表有将近 几千条 url 记录,每条记录都是一个图片,我需要请求他们拿到每个图片存到本地.一开始我是这么写的(伪代码): import requests for url in ur ...

  5. 【Azure Redis 缓存】 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connection reset by peer"

    问题描述 Python连接Azure Redis, 使用redis.ConnectionPool 出现 "ConnectionResetError: [Errno 104] Connecti ...

  6. Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)

    Can't connect to MySQL server Lost connection to MySQL server during query · Issue #269 · PyMySQL/Py ...

  7. PHP系列 | PDO::prepare(): send of 68 bytes failed with errno=32 Broken pipe

    设计场景 1.开启Redis的键空间过期事件(键过期发布任务),创建订单创建一个过期的key,按照订单号为key,设置过期时间. 2.通过Redis的订阅模式(持久阻塞),获取到订单号进行组装. 3. ...

  8. gem install 出现Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org

    在安装了rvm来管理多版本的ruby之后,想在不同环境下安装一些gems,结果gem install puma 之后,发现一次又一次失败. gem install 出现Errno::ECONNRESE ...

  9. gem install 出现Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://ruby.taobao.org

    这几天在ubuntu14.04.1 64位上安装rails的时候,由于大天朝的原因,更换了淘宝源,然后执行 gem install rails 这个时候,总是会提示 Errno::ECONNRESET ...

随机推荐

  1. appium元素定位之AndroidUiAutomator

    UIAutomator 元素定位是 Android 系统原生支持的定位方式,虽然与 xpath 类似,但比它更好用,并且支持元素全部的属性定位,定位原理是通过 android 自带的android u ...

  2. emojy表情的小问题

    报错内容:在emojy表情入库或者更新库的时候,会报这个错:java.sql.SQLException:Incorrect string value: '\xF0\x9F\x99\x8F\..' fo ...

  3. 双系统卸载ubuntu

    转载自https://www.jianshu.com/p/30795695be95 如果开机是这样子的,就是ubuntu引导windows(专业名词gpt) ubuntu引导windows 那么先进w ...

  4. css 揭秘-读书笔记

    css 揭秘 [希]Lea verou 著 css 魔法 译 该书涵盖7大主题,47个css技巧,是css进阶必备书籍,开阔思路,探寻更优雅的解决方案.这本书完全用css渲染出的html写成的(布局. ...

  5. SSH框架之Struts2第二篇

    1.2 知识点 1.2.1 Struts2的Servlet的API的访问 1.2.1.1 方式一 : 通过ActionContext实现 页面: <h1>Servlet的API的访问方式一 ...

  6. axios请求无法携带cookie

    背景 最近在用vue重构公司公司AngularJS 1.X项目,老项目身份认证采用的cookie,前端ajax库采用是angularJS的$http/$resource服务,新版采用的是axios,但 ...

  7. 关于ImageView的几个常见问题

    版权声明:本文为xing_star原创文章,转载请注明出处! 本文同步自http://javaexception.com/archives/173 最近几天碰到了ImageView的backgroun ...

  8. Ubuntu16.0 GTX1660Ti 安装NVIDIA CUDA cuDNN Tensflow

    主要参考这篇文章Ubuntu16.04(GTX1660ti)cuda10.0和cudnn7.6环境配置 (环境乃一生之敌!!!). 容易错的点: 安装NVIDIA驱动的时候选择run版本,不要选择de ...

  9. Thinkphp 模板中 if 嵌套层级过多的问题,嵌套3级就报错,取消层级限制

    解决此问题有两种办法:1.第三层if换成eq或者原生<?php 'abc';>  2.修改Tp核心配置文件 1.第三层if换成eq或者原生<?php 'abc';> 如下图&l ...

  10. PyCharm批量修改变量名

    方法和 PyCharm重命名文件时更改引用的地方相同