current position:Home>Swoole reported that redis caused a deadlock in the collaboration process

Swoole reported that redis caused a deadlock in the collaboration process

2022-02-04 17:03:38 CSDN Q & A

Error message

[2021-10-09 16:36:31 *15502.0]    WARNING    Worker_reactor_try_to_exit (ERRNO 9012): worker exit timeout, forced termination=================================================================== [FATAL ERROR]: all coroutines (count: 1) are asleep - deadlock!=================================================================== [Coroutine-4633]--------------------------------------------------------------------#0  Redis->lPop() called at [/app/vendor/hyperf/redis/src/RedisConnection.php:76]#1  Hyperf\Redis\RedisConnection->__call() called at [/app/vendor/hyperf/redis/src/Redis.php:49]#2  Hyperf\Redis\Redis->__call() called at [/app/vendor/hyperf/redis/src/RedisProxy.php:32]#3  Hyperf\Redis\RedisProxy->__call() called at [/app/app/Controller/WebSocket/WebSocketGetHandleCount.php:61]

The code is as follows

     swoole_timer_tick(1000*3, function ($timer_id) use ($fd,$server,$userId,&$userTimer,$redis,$teamIdLists,$getPriceCount) {                if(!$server->isEstablished($fd)){                    swoole_timer_clear($timer_id);                }                  //  This section is used when a user logs in , take redis Data in                 $info = $redis->lPop(Constant::REDIS_PREFIX . "wos_reminder_{$userId}");                if(!empty($info))                {                    $message = json_decode($info,true);                    $server->push($fd, WebSocketCommon::pack("",[                        "type"=>"message",                        "work_order_id"=>$message["work_order_id"]??"",                        "work_order_sn"=>$message["work_order_sn"],                        "question_class_name"=>$message["question_class_name"],                        "send_organization_name"=>$message["send_organization_name"],                        "send_user_name"=>$message["send_user_name"],                        "send_user_tel"=>$message["send_user_tel"],                        'time'=>$message["time"]                    ]));                }} Do you have a big man to help take a look 

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041703369222.html

Random recommended