运行一段时间后,gateway和businessworker连不上,worker停止运行

lin60

之前稳定运行了几个月没问题,最近频繁出现这个问题,大概一天会出现两次,没法正常运行了,看日志好像是gateway和businessworker突然连不上,什么原因会导致这样呢
异常信息如下:

pid:42 Exception: can not connect to tcp://127.0.0.1:39130 Connection refused in /app/vendor/workerman/gateway-worker/src/Lib/Gateway.php:1143
Stack trace:
#0 /app/vendor/workerman/gateway-worker/src/Lib/Gateway.php(1092): GatewayWorker\Lib\Gateway::sendAndRecv('127.0.0.1:39130', Array)
#1 /app/vendor/workerman/gateway-worker/src/BusinessWorker.php(378): GatewayWorker\Lib\Gateway::getSession('7f00000198da000...')
#2 /app/vendor/workerman/workerman/Connection/TcpConnection.php(658): GatewayWorker\BusinessWorker->onGatewayMessage(Object(Workerman\Connection\AsyncTcpConnection), Array)
#3 [internal function]: Workerman\Connection\TcpConnection->baseRead(Resource id #152, 2, Resource id #152)
#4 /app/vendor/workerman/workerman/Events/Event.php(195): EventBase->loop()
#5 /app/vendor/workerman/workerman/Worker.php(2382): Workerman\Events\Event->loop()
#6 /app/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): Workerman\Worker->run()
#7 /app/vendor/workerman/workerman/Worker.php(1490): GatewayWorker\BusinessWorker->run()
#8 /app/vendor/workerman/workerman/Worker.php(1320): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\BusinessWorker))
#9 /app/vendor/workerman/workerman/Worker.php(1294): Workerman\Worker::forkWorkersForLinux()
#10 /app/vendor/workerman/workerman/Worker.php(509): Workerman\Worker::forkWorkers()
#11 /app/Applications/Server/start.php(44): Workerman\Worker::runAll()
#12 {main}
pid:42 Worker[42] process terminated
3217 2 0
2个回答

walkor 打赏

出现这个问题后运行 php start.php status 贴下结果。

  • 暂无评论
lin60

截图

  • walkor 2020-02-11

    根据报错应该是gateway进程有退出的情况,status命令可以看到进程退出数据,但是因为你的服务重启了,没有看到相关数据。之前稳定运行,最近出现问题的话想下最近有什么变动没?比如是否升级了php或者其它变动

  • lin60 2020-02-11

    没有重启,出现问题后,直接跑的status

  • lin60 2020-02-11

    就是最近没有什么变动,所以不知道为什么突然这样了...一直都是跑在docker里面的

年代过于久远,无法发表回答
×
🔝