webman平滑重启出现失败

DreamWake

问题描述

修改代码后,执行php start.php reload -d平滑重启后,没过多久发现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

操作系统及workerman/webman等框架组件具体版本

系统信息:

[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版本:
截图

263 1 0
1个回答

walkor

一般是启动时没加-d。reload 加-d没有意义。

  • DreamWake 2024-05-15

    刚测试了一下启动不加-d没复现这个问题。

    通过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”

    看起来不是这个原因

  • walkor 2024-05-15

    启动不加 -d,终端关闭后进程一般会退出。
    如果不是这个原因,也可能是服务器重启了,运行 top 命令能看到服务器启动时间

  • DreamWake 2024-05-15

    看了top结果也没问题,没有重启:

    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

×
🔝