項(xiàng)目中有同時(shí)建立TCP和WebSocket服務(wù),設(shè)備TCP連接,監(jiān)控端連接ws連接,目的是為了將數(shù)據(jù)直接推送到監(jiān)控端實(shí)時(shí)展示。
數(shù)據(jù)量測(cè)試時(shí)約為每秒3~5條數(shù)據(jù)
最近發(fā)現(xiàn),當(dāng)監(jiān)控端異常斷開(kāi)后,比如監(jiān)控端的電腦休眠了,服務(wù)端沒(méi)有正常檢測(cè)到監(jiān)控端退出,會(huì)導(dǎo)致服務(wù)端的服務(wù)停止
php 7.3.31
已經(jīng)配置了WebSocket心跳間隔
$gateway->pingInterval = 60;
$gateway->pingNotResponseLimit = 1;
2023-02-11 21:03:50 pid:707931 Workerman[start.php] stopping ...
2023-02-11 21:03:50 pid:707932 worker[707932] remains 6 connection(s)
2023-02-11 21:03:50 pid:707932 worker[707932] remains 3 connection(s)
2023-02-11 21:03:50 pid:707932 worker[707932] remains 0 connection(s)
2023-02-11 21:03:50 pid:752087 worker[752087] remains 4 connection(s)
2023-02-11 21:03:50 pid:752085 worker[752085] remains 4 connection(s)
2023-02-11 21:03:50 pid:752088 worker[752088] remains 4 connection(s)
2023-02-11 21:03:50 pid:752086 worker[752086] remains 4 connection(s)
2023-02-11 21:03:50 pid:707936 worker[707936] remains 4 connection(s)
2023-02-11 21:03:50 pid:707939 worker[707939] remains 6 connection(s)
2023-02-11 21:03:50 pid:707938 worker[707938] remains 4 connection(s)
2023-02-11 21:03:50 pid:707931 worker[TTBusinessWorker:707932] exit with status 65280
2023-02-11 21:03:50 pid:707934 worker[707934] remains 6 connection(s)
2023-02-11 21:03:50 pid:707934 worker[707934] remains 3 connection(s)
2023-02-11 21:03:50 pid:707934 worker[707934] remains 0 connection(s)
2023-02-11 21:03:50 pid:707937 worker[707937] remains 4 connection(s)
2023-02-11 21:03:50 pid:707931 worker[TTBusinessWorker:707934] exit with status 65280
2023-02-11 21:03:51 pid:707935 worker[707935] remains 6 connection(s)
2023-02-11 21:03:51 pid:707935 worker[707935] remains 3 connection(s)
2023-02-11 21:03:51 pid:707935 worker[707935] remains 0 connection(s)
2023-02-11 21:03:51 pid:752085 worker[752085] remains 2 connection(s)
2023-02-11 21:03:51 pid:752087 worker[752087] remains 2 connection(s)
2023-02-11 21:03:51 pid:752088 worker[752088] remains 2 connection(s)
2023-02-11 21:03:51 pid:752086 worker[752086] remains 2 connection(s)
2023-02-11 21:03:51 pid:707938 worker[707938] remains 2 connection(s)
2023-02-11 21:03:51 pid:707936 worker[707936] remains 2 connection(s)
2023-02-11 21:03:51 pid:707931 worker[TTBusinessWorker:707935] exit with status 65280
2023-02-11 21:03:51 pid:707933 worker[707933] remains 6 connection(s)
2023-02-11 21:03:51 pid:707933 worker[707933] remains 3 connection(s)
2023-02-11 21:03:51 pid:707933 worker[707933] remains 0 connection(s)
2023-02-11 21:03:51 pid:707937 worker[707937] remains 2 connection(s)
2023-02-11 21:03:51 pid:707939 worker[707939] remains 3 connection(s)
2023-02-11 21:03:51 pid:707940 worker[707940] remains 8 connection(s)
2023-02-11 21:03:51 pid:707931 worker[TTBusinessWorker:707933] exit with status 65280
2023-02-11 21:03:52 pid:707939 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2023-02-11 21:03:52 pid:707939 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2023-02-11 21:03:52 pid:707937 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2023-02-11 21:03:52 pid:707937 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2023-02-11 21:03:55 pid:707939 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
2023-02-11 21:03:55 pid:707939 SendBufferToWorker fail. The connections between Gateway and BusinessWorker are not ready. See http://doc2.workerman.net/send-buffer-to-worker-fail.html
是否因?yàn)閷?shí)際監(jiān)控端不在線,導(dǎo)致推送的消息失敗引發(fā)的故障呢? 應(yīng)該怎樣才能處理? 謝謝。
2023-02-11 21:03:50 pid:707931 Workerman[start.php] stopping ...
這條日志之前的日志是啥?看起來(lái)是執(zhí)行了php start.php stop -g 呢。
還有你也沒(méi)貼workerman版本
謝謝您的回復(fù),前面沒(méi)有日志了,停止之前沒(méi)有提示什么。上一條日志就是之前手動(dòng)操作停止的記錄
2023-02-11 17:30:22 pid:707931 worker[TTWebsocket:707941] exit with status 64000
2023-02-11 17:30:22 pid:707931 worker[TTWebsocket:707942] exit with status 64000
2023-02-11 17:30:22 pid:707931 worker[TTWebsocket:707944] exit with status 64000
2023-02-11 17:30:22 pid:707931 worker[TTWebsocket:707943] exit with status 64000
2023-02-11 21:03:50 pid:707931 Workerman[start.php] stopping ...
2023-02-11 21:03:50 pid:707932 worker[707932] remains 6 connection(s)
2023-02-11 21:03:50 pid:707932 worker[707932] remains 3 connection(s)
2023-02-11 21:03:50 pid:707932 worker[707932] remains 0 connection(s)
2023-02-11 21:03:50 pid:752087 worker[752087] remains 4 connection(s)
......
workerman 版本是 4.0.27
gateway-worker 版本是 3.0.22
workerman 4.0.27 4.0.28 debug方式運(yùn)行時(shí),終端斷開(kāi)信號(hào)處理有點(diǎn)問(wèn)題,升級(jí)下workerman