gatewayworker运行一段时间后出sendAndRecv 异常,导致worker退出

lin60

gatewayworker运行一段时间后出sendAndRecv 异常,导致worker退出

pid:62 Exception: can not connect to tcp://127.0.0.1:39130 Cannot assign requested address 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/Applications/Server/Events.php(159): GatewayWorker\Lib\Gateway::getSession('7f00000198da000...')
#2 [internal function]: Events::onMessage('7f00000198da000...', '{"type":"Comeba...')
#3 /app/vendor/workerman/gateway-worker/src/BusinessWorker.php(404): call_user_func('Events::onMessa...', '7f00000198da000...', '{"type":"Comeba...')
#4 /app/vendor/workerman/workerman/Connection/TcpConnection.php(660): GatewayWorker\BusinessWorker->onGatewayMessage(Object(Workerman\Connection\AsyncTcpConnection), Array)
#5 [internal function]: Workerman\Connection\TcpConnection->baseRead(Resource id #167, 2, Resource id #167)
#6 /app/vendor/workerman/workerman/Events/Event.php(195): EventBase->loop()
#7 /app/vendor/workerman/workerman/Worker.php(2408): Workerman\Events\Event->loop()
#8 /app/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): Workerman\Worker->run()
#9 /app/vendor/workerman/workerman/Worker.php(1541): GatewayWorker\BusinessWorker->run()
#10 /app/vendor/workerman/workerman/Worker.php(1371): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\BusinessWorker))
#11 /app/vendor/workerman/workerman/Worker.php(1345): Workerman\Worker::forkWorkersForLinux()
#12 /app/vendor/workerman/workerman/Worker.php(1675): Workerman\Worker::forkWorkers()
#13 /app/vendor/workerman/workerman/Worker.php(1624): Workerman\Worker::monitorWorkersForLinux()
#14 /app/vendor/workerman/workerman/Worker.php(548): Workerman\Worker::monitorWorkers()
#15 /app/Applications/Server/start.php(41): Workerman\Worker::runAll()
#16 {main}
2020-10-29 21:03:16 pid:62 Worker[62] process terminated
2020-10-29 21:03:16 pid:1 worker[Yueqing-PortalBusinessWorker:62] exit with status 64000
2020-10-29 21:03:17 pid:46 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2020-10-29 21:03:17 pid:46 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2020-10-29 21:03:17 pid:46 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
1994 1 0
1个回答

walkor 打赏

按照手册 http://doc.workerman.net/appendices/kernel-optimization.html 优化下linux内核。
尤其是 net.ipv4.tcp_max_tw_buckets = 20000

  • lin60 2020-10-29

    用的docker跑的,在物理机上优化知乎,docker容器里还要优化吗?容器里找不到/etc/sysctl.conf,也没有sysctl命令

  • walkor 2020-10-30

    添加一个

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