Gateway::getSession 有时候会无响应,出现process_timeout:错误

0

堆栈只打印到了onMessage方法, 但是我在onMessage里面打印了日志, 发现Gateway::getSession上一行有日志, 下一行就没有日志了, 估计是getSession方法有问题吗


 process_timeout:
#1 : Events::onMessage('7f0000019894000...', '[{"userId":"803...')
#2 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/gateway-worker/src/BusinessWorker.php(403): call_user_func('Events::onMessa...', '7f0000019894000...', '[{"userId":"803...')
#3 : GatewayWorker\BusinessWorker->onGatewayMessage(Object(Workerman\Connection\AsyncTcpConnection), Array)
#4 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Connection/TcpConnection.php(658): call_user_func(Array, Object(Workerman\Connection\AsyncTcpConnection), Array)
#5 : Workerman\Connection\TcpConnection->baseRead(Resource id #171)
#6 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Events/Select.php(294): call_user_func_array(Array, Array)
#7 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Worker.php(2321): Workerman\Events\Select->loop()
#8 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): Workerman\Worker->run()
#9 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Worker.php(1452): GatewayWorker\BusinessWorker->run()
#10 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Worker.php(1282): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\BusinessWorker))
#11 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Worker.php(1256): Workerman\Worker::forkWorkersForLinux()
#12 /mnt/d/Projects/Game/Game-ServProj/vendor/workerman/workerman/Worker.php(507): Workerman\Worker::forkWorkers()
#13 /mnt/d/Projects/Game/Game-ServProj/Applications/Server/start.php(41): Workerman\Worker::runAll()
已邀请:

walkor

赞同来自:

process_timeout 说明Events::onMessage里面的业务代码执行时间超过30秒。
根据你的说法有可能getSession超时,也可能是由于其它地方执行时间长导致刚好执行到getSession到达限制30秒。
另外没有安装event扩展以及没有按照workerman手册优化linux内核也会导致类似问题。
 
 

要回复问题请先登录注册