资讯专栏INFORMATION COLUMN

RedisException: read error on connection

luckyw / 1095人阅读

摘要:推送数据,使用缓存时不时的爆出错误导致进程终止。通过百度我做了几番努力设置缓存时间没卵用不超时设置不超时验证中。。。

gateway推送数据,使用redis缓存时不时的爆出错误:
RedisException: read error on connection in /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/cache/driver/Redis.php:121

Stack trace:
#0 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/cache/driver/Redis.php(121): Redis->setex("cc_table_member...", 18000, 1543818152)
#1 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/Cache.php(148): thinkcachedriverRedis->set("table_members_2...", 1543818152, 18000)
#2 /data/wwwroot/test2.tigerisa.com/application/push/controller/Events.php(298): thinkCache::set("table_members_2...", 1543818152, 18000)
#3 [internal function]: apppushcontrollerEvents::onClose("7f0000010f3d000...")
#4 /data/wwwroot/test2.tigerisa.com/vendor/workerman/gateway-worker/src/BusinessWorker.php(409): call_user_func("apppushcontr...", "7f0000010f3d000...")
#5 [internal function]: GatewayWorkerBusinessWorker->onGatewayMessage(Object(WorkermanConnectionAsyncTcpConnection), Array)
#6 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Connection/TcpConnection.php(650): call_user_func(Array, Object(WorkermanConnectionAsyncTcpConnection), Array)
#7 [internal function]: WorkermanConnectionTcpConnection->baseRead(Resource id #103)
#8 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Events/Select.php(295): call_user_func_array(Array, Array)
#9 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Worker.php(2323): WorkermanEventsSelect->loop()
#10 /data/wwwroot/test2.tigerisa.com/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): WorkermanWorker->run()
#11 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Worker.php(1452): GatewayWorkerBusinessWorker->run()
#12 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Worker.php(1282): WorkermanWorker::forkOneWorkerForLinux(Object(GatewayWorkerBusinessWorker))
#13 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Worker.php(1256): WorkermanWorker::forkWorkersForLinux()
#14 /data/wwwroot/test2.tigerisa.com/vendor/workerman/workerman/Worker.php(507): WorkermanWorker::forkWorkers()
#15 /data/wwwroot/test2.tigerisa.com/application/push/controller/Run.php(62): WorkermanWorker::runAll()
#16 [internal function]: apppushcontrollerRun->__construct()
#17 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/App.php(359): ReflectionClass->newInstanceArgs(Array)
#18 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/Loader.php(479): thinkApp::invokeClass("apppushcontro...")
#19 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/App.php(575): thinkLoader::controller("run", "controller", false, "Error")
#20 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/App.php(456): thinkApp::module(Array, Array, true)
#21 /data/wwwroot/test2.tigerisa.com/thinkphp/library/think/App.php(139): thinkApp::exec(Array, Array)
#22 /data/wwwroot/test2.tigerisa.com/thinkphp/start.php(19): thinkApp::run()
#23 /data/wwwroot/test2.tigerisa.com/public/server.php(50): require("/data/wwwroot/t...")
#24 {main}
Worker[10879] process terminated

导致进程终止。

通过百度我做了几番努力:
1、 设置缓存时间 Cache::set($key,json_encode($value,JSON_UNESCAPED_UNICODE),18000);------------------没卵用
2、 ini_set("default_socket_timeout", -1); //不超时 设置不超时-------------------------------------验证中。。。

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/37000.html

相关文章

  • read error on connection的两种原因分析

    摘要:最近线上模块偶现具体报错日志如下通过分析和学习之后,发现两种原因可能导致返回执行超时使用已经断开的连接下面将对这两种情况进行具体的分析。四参考和错误排查超时问题及解决 最近线上php模块偶现 read error on connection;具体报错日志如下 Uncaught exception RedisException with message read error on co...

    0x584a 评论0 收藏0
  • Uncaught RedisException: socket error on read sock

    摘要:问题描述最近在使用的发布订阅系统来做公司项目的消息队列。初步判断是由于发送消息的服务器产生的消息过多。可以看出通通设置为是不受缓冲区大小的限制。通过设置为零,硬或软限制都可以被禁用。 问题描述 最近在使用redis的发布订阅系统来做公司项目的消息队列。一台服务器发布消息,多台服务器订阅获取消息。在系统使用高峰期上午10点左右偶发性的有些服务器的Redis链接被断开并报错: Uncaug...

    Sunxb 评论0 收藏0
  • tornado 源码之 iostream.py

    摘要:对进行包装,采用注册回调方式实现非阻塞。通过接口注册各个事件回调中事件发生后,调用方法,对事件进行分发。 iostream.py A utility class to write to and read from a non-blocking socket. IOStream 对 socket 进行包装,采用注册回调方式实现非阻塞。 通过接口注册各个事件回调 _read_callb...

    JeOam 评论0 收藏0
  • [case37]聊聊lettuce的shareNativeConnection参数

    摘要:序本文主要研究一下的参数可以看到这里的默认为,表示多个将共享一个如果该值为,则及方法使用的是在为的时候,调用的是要注意这里维护了,第一个为的时候,才调用去获取另外要注意,这里的,默认是的,也就是说只要不为,就不会归还,每次 序 本文主要研究一下lettuce的shareNativeConnection参数 LettuceConnectionFactory spring-data-red...

    kgbook 评论0 收藏0
  • tornado 源码分析 之 异步io的实现方式

    摘要:前言本文将尝试详细的带大家一步步走完一个异步操作从而了解是如何实现异步的其实本文是对上一篇文的实践和复习主旨在于关注异步的实现所以会忽略掉代码中的一些异常处理文字较多凑合下吧接下来只会贴出部分源码帮助理解希望有耐心的同学打开源码一起跟踪一遍 前言 本文将尝试详细的带大家一步步走完一个异步操作,从而了解tornado是如何实现异步io的. 其实本文是对[上一篇文][1]的实践和复习 主...

    xiangzhihong 评论0 收藏0

发表评论

0条评论

luckyw

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<