請教一下,這種錯誤一般怎么處理?
原來在一臺服務(wù)器上部署沒有出現(xiàn)過這種問題,把businessworker部署到局域網(wǎng)上后,偶爾會出現(xiàn)以下錯誤退出。
是因為Gateway太忙了嗎?
謝謝!
2019-03-08 21:56:46 pid:32583 Worker process terminated2019-03-08 21:56:46 pid:32577 worker exit with status 64000
2019-03-08 21:56:50 pid:3726 Exception: can not connect to tcp://192.168.9.160:7004 Operation now in progress in /var/www/server/vendor/workerman/gateway-worker/src/Lib/Gateway.php:1143
Stack trace:
#0 /var/www/server/vendor/workerman/gateway-worker/src/Lib/Gateway.php(1092): GatewayWorker\Lib\Gateway::sendAndRecv('192.168.9.160:7...', Array)
#1 /var/www/server/vendor/workerman/gateway-worker/src/BusinessWorker.php(378): GatewayWorker\Lib\Gateway::getSession('c0a809a01b5c000...')
#2 : GatewayWorker\BusinessWorker->onGatewayMessage(Object(Workerman\Connection\AsyncTcpConnection), Array)
#3 /var/www/server/vendor/workerman/workerman/Connection/TcpConnection.php(658): call_user_func(Array, Object(Workerman\Connection\AsyncTcpConnection), Array)
#4 : Workerman\Connection\TcpConnection->baseRead(Resource id #6994, 2, Resource id #6994)
#5 /var/www/server/vendor/workerman/workerman/Events/Event.php(195): EventBase->loop()
#6 /var/www/server/vendor/workerman/workerman/Worker.php(2321): Workerman\Events\Event->loop()
#7 /var/www/server/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): Workerman\Worker->run()
#8 /var/www/server/vendor/workerman/workerman/Worker.php(1452): GatewayWorker\BusinessWorker->run()
#9 /var/www/server/vendor/workerman/workerman/Worker.php(1282): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\BusinessWorker))
#10 /var/www/server/vendor/workerman/workerman/Worker.php(1256): Workerman\Worker::forkWorkersForLinux()
#11 /var/www/server/vendor/workerman/workerman/Worker.php(1586): Workerman\Worker::forkWorkers()
#12 /var/www/server/vendor/workerman/workerman/Worker.php(1535): Workerman\Worker::monitorWorkersForLinux()
#13 /var/www/server/vendor/workerman/workerman/Worker.php(509): Workerman\Worker::monitorWorkers()
#14 /var/www/server/start.php(45): Workerman\Worker::runAll()
#15 {main}
2019-03-08 21:56:50 pid:3726 Worker process terminated
2019-03-08 21:56:50 pid:32577 worker exit with status 64000
報錯的時候看下各個服務(wù)器的負(fù)載是不是高了。有可能是負(fù)載高了導(dǎo)致。
另外每臺服務(wù)器都要裝event擴展,并按照手冊?http://doc.workerman.net/appendices/kernel-optimization.html 優(yōu)化linux內(nèi)核。一般普通內(nèi)核配置不優(yōu)化無法承載高并發(fā)。
都安裝有擴展,Gateway的主機安裝的libevent, business主機裝的event,內(nèi)核也優(yōu)化過。
但是優(yōu)化內(nèi)核時這一條好像有問題
sysctl: cannot stat /proc/sys/net/ipv4/tcp_tw_recycle: No such file or directory
不知道影響不影響。
另外在開business主機上開status -d 才出現(xiàn)這樣的錯誤,不開就不會出??村e提示里有
估計跟狀態(tài)實時查看有關(guān)系。
Gateway主機是有外網(wǎng)的,businessworker主機沒有外網(wǎng)的,我是通過Gateway主機,ssh到business主機上開的status -d
其實,這個錯誤也影響不大,只是想提供一些線索,供大家參考。
我也遇到這種情況,不知道怎么解決。
也裝了擴展,內(nèi)核也優(yōu)化了,還是時不時的報這個錯誤,也沒有規(guī)律
2020-08-11 07:38:39 pid:4876 exception 'RedisException' with message 'Operation now in progress' in /tosan/command/v2/include/meters.class.php:81
Stack trace:
#0 /tosan/command/v2/include/meters.class.php(81): Redis->connect('r-bp1r053jp8skc...', 6379)
#1 /tosan/command/v2/Applications/app/Events.php(183): Meters->gprs(Array)
#2 [internal function]: Events::onMessage('7f000001206c000...', 'h@p4\x11\x19@\xE8\xC1\x83\x07\x81\n\x00\x00...')
#3 /tosan/command/v2/vendor/workerman/gateway-worker/src/BusinessWorker.php(403): call_user_func('Events::onMessa...', '7f000001206c000...', 'h@p4\x11\x19@\xE8\xC1\x83\x07\x81\n\x00\x00...')
#4 [internal function]: GatewayWorker\BusinessWorker->onGatewayMessage(Object(Workerman\Connection\AsyncTcpConnection), Array)
#5 /tosan/command/v2/vendor/workerman/workerman/Connection/TcpConnection.php(658): call_user_func(Array, Object(Workerman\Connection\AsyncTcpConnection), Array)
#6 [internal function]: Workerman\Connection\TcpConnection->baseRead(Resource id #502, 2, Resource id #502)
#7 /tosan/command/v2/vendor/workerman/workerman/Events/Event.php(195): EventBase->loop()
#8 /tosan/command/v2/vendor/workerman/workerman/Worker.php(2408): Workerman\Events\Event->loop()
#9 /tosan/command/v2/vendor/workerman/gateway-worker/src/BusinessWorker.php(197): Workerman\Worker->run()
#10 /tosan/command/v2/vendor/workerman/workerman/Worker.php(1541): GatewayWorker\BusinessWorker->run()
#11 /tosan/command/v2/vendor/workerman/workerman/Worker.php(1371): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\BusinessWorker))
#12 /tosan/command/v2/vendor/workerman/workerman/Worker.php(1345): Workerman\Worker::forkWorkersForLinux()
#13 /tosan/command/v2/vendor/workerman/workerman/Worker.php(1675): Workerman\Worker::forkWorkers()
#14 /tosan/command/v2/vendor/workerman/workerman/Worker.php(1624): Workerman\Worker::monitorWorkersForLinux()
#15 /tosan/command/v2/vendor/workerman/workerman/Worker.php(548): Workerman\Worker::monitorWorkers()
#16 /tosan/command/v2/start.php(45): Workerman\Worker::runAll()
#17 {main}
2020-08-11 07:38:39 pid:4876 Worker[4876] process terminated
2020-08-11 07:38:39 pid:11803 worker[NSBusinessworker:4876] exit with status 64000
2020-08-11 08:38:32 pid:15948 Workerman[/tosan/command/v2/start.php] status