在workerman中使用redis运行一段时间后出现createGlobalClientId fail问题

bystreet

workerman.log日志如下:

2015-10-22 18:33:37 exception 'RedisException' with message 'read error on connection' in /var/www/KT2000Server/SAMVCMS/GatewayWorker/Lib/StoreDriver/Redis.php:24
Stack trace:
#0 /var/www/KT2000Server/SAMVCMS/GatewayWorker/Lib/StoreDriver/Redis.php(24): Redis->incr('GLOBAL_CLIENT_I...')
#1 /var/www/KT2000Server/SAMVCMS/GatewayWorker/Gateway.php(361): GatewayWorker\Lib\StoreDriver\Redis->increment('GLOBAL_CLIENT_I...')
#2 /var/www/KT2000Server/SAMVCMS/GatewayWorker/Gateway.php(205): GatewayWorker\Gateway->createGlobalClientId()
#3 : GatewayWorker\Gateway->onClientConnect(Object(Workerman\Connection\TcpConnection))
#4 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(1347): call_user_func(Array, Object(Workerman\Connection\TcpConnection))
#5 : Workerman\Worker->acceptConnection(Resource id #31)
#6 /var/www/KT2000Server/SAMVCMS/Workerman/Events/Select.php(263): call_user_func_array(Array, Array)
#7 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(1297): Workerman\Events\Select->loop()
#8 /var/www/KT2000Server/SAMVCMS/GatewayWorker/Gateway.php(183): Workerman\Worker->run()
#9 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(781): GatewayWorker\Gateway->run()
#10 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(750): Workerman\Worker::forkOneWorker(Object(GatewayWorker\Gateway))
#11 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(327): Workerman\Worker::forkWorkers()
#12 /var/www/KT2000Server/SAMVCMS/start.php(46): Workerman\Worker::runAll()
#13 {main}
2015-10-22 18:34:01 WORKER EXIT UNEXPECTED E_ERROR Class 'Tools\Exception' not found in /var/www/KT2000Server/SAMVCMS/Applications/SUMVCMSCenter/Tools/RedisUtils.php on line 85
2015-10-22 18:34:10 worker exit with status 65280
2015-10-22 18:34:10 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready
2015-10-22 18:34:10 createGlobalClientId fail GatewayWorker\Lib\StoreDriver\Redis :
2015-10-22 18:34:10 storeClientAddress fail.
2015-10-22 18:34:10 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready
2015-10-22 18:34:10 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready
2015-10-22 18:35:10 createGlobalClientId fail GatewayWorker\Lib\StoreDriver\Redis :
5992 2 0
2个回答

bystreet

不是必现的。有没有人遇到过此问题,如何解决呢。

  • 暂无评论
walkor

reidis扩展不是很稳定,偶尔会报这个错,可以去更新下GatewayWorker,大概上个月有人针对这个问题做了一层兼容,使用redis前ping一下检查连接状态。

  • 暂无评论
年代过于久远,无法发表回答
🔝