修改代碼后,執(zhí)行php start.php reload -d
平滑重啟后,沒過多久發(fā)現(xiàn)webman停了。請問是什么原因,能否給點排查建議?
查看runtime/logs/workerman.log日志如下:
2024-05-15 11:14:41 pid:3660 Workerman[start.php] reload
2024-05-15 11:14:41 pid:16131 Workerman[start.php] reloading
2024-05-15 11:15:18 pid:16131 Workerman[start.php] stopping ...
2024-05-15 11:15:18 pid:16131 Workerman[start.php] has been stopped
系統(tǒng)信息:
[root@xxx yyy]# cat /etc/*-release
CentOS Linux release 8.1.1911 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
框架版本和PHP版本:
一般是啟動時沒加-d。reload 加-d沒有意義。
剛測試了一下啟動不加-d沒復(fù)現(xiàn)這個問題。
通過php start.php start不帶-d啟動項目,日志中會有“2024-05-15 15:14:51 pid:28453 Workerman[start.php] start in DEBUG mode”的記錄
而看異常最近一次啟動日志是“2024-04-25 09:46:20 pid:12291 Workerman[start.php] start in DAEMON mode”
看起來不是這個原因
看了top結(jié)果也沒問題,沒有重啟:
top - 15:38:17 up 65 days, 2:02, 5 users, load average: 0.04, 0.01, 0.00
Tasks: 215 total, 1 running, 214 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.2 us, 0.0 sy, 0.0 ni, 96.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 7543.2 total, 567.8 free, 835.3 used, 6140.2 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 6285.9 avail Mem