workerman.log中的信息
2019-01-04 12:30:15 pid:22312 process_timeout:#1 /usr/MDDeviceService/vendor/workerman/workerman/Events/Select.php(263): pcntl_signal_dispatch()
Events.php的onMessage里的業(yè)務代碼執(zhí)行的太慢了,超過了30秒
把Events.php 里上面加上declare(ticks=1);,然后reload。下次發(fā)生process_timeout時一般會打印更詳細的調(diào)用棧,就能知道業(yè)務代碼是在哪一行執(zhí)行的慢
另外發(fā)生這種情況的時候一般會出現(xiàn)長時間busy的進程,通過手冊這個方法也大概能定位到
http://doc.workerman.net/debug/busy-process.html
2019-01-08 10:37:22 pid:20248 process_timeout:
業(yè)務處理慢只能業(yè)務想辦法??吹绞莍nsert比較慢,可能是onMessage里批量循環(huán)插入了太多的數(shù)據(jù)導致耗時很高,也可能是mysql死鎖或者高負載導致insert很慢