用户模块插件,502报错

owenzhang

提起

我使用https://www.workerman.net/download
安装的php环境
估计是这个包的问题,已反馈给walkor大佬了
该问题与另外一个问题估计一样的https://www.workerman.net/q/13608
我先用原生的php环境安装试下,再来,
大家散了吧

问题描述

截图
线上环境debian12,php8.2,
webman/admin 0.6.33
workerman/webman-framework 1.6.9

使用php start.php start -d
报502错误
截图

如果使用php start.php start
就正常
但终端会输出 /home/www/ai/runtime/tmp/limit/20241223

# sudo php start.php start
Workerman[start.php] start in DEBUG mode
------------------------------------------- WORKERMAN -------------------------------------------
Workerman version:4.2.1          PHP version:8.2.24           Event-Loop:\Workerman\Events\Event
-------------------------------------------- WORKERS --------------------------------------------
proto   user            worker            listen                   processes    status           
tcp     root            webman            http://127.0.0.1:8341    1             [OK]            
tcp     root            monitor           none                     1             [OK]            
tcp     root            redis_consumer    none                     4             [OK]            
-------------------------------------------------------------------------------------------------
Press Ctrl+C to stop. Start success.
/home/www/ai/runtime/tmp/limit/20241223

也就是说 -d模式下 /home/www/ai/runtime/tmp/limit/20241223这个文件生成不了
但我已经给runtime文件夹755权限,其他的日志文件都可以正常生成和写入

我在项目根目录下执行
/home/www/ai# sudo chmod -R 755 runtime

这个问题一天出现一次,就说limit/20241223每天生成这个文件一次,但比如我今天把这个runtime文件都删除了,然后再执行php start.php start -d 该问题就不会出现,因为刚刚执行了一次了,就很奇怪

# sudo php start.php status
Workerman[start.php] status 
----------------------------------------------GLOBAL STATUS----------------------------------------------------
Workerman version:4.2.1          PHP version:8.2.24
start time:2024-12-24 11:42:18   run 0 days 0 hours   
load average: 0, 0, 0            event-loop:\Workerman\Events\Event
3 workers       6 processes
worker_name    exit_status      exit_count
webman         0                0
monitor        0                0
redis_consumer 0                0
----------------------------------------------PROCESS STATUS---------------------------------------------------
pid     memory  listening             worker_name    connections send_fail timers  total_request qps    status
1906    4.03M   http://127.0.0.1:8341 webman         1           0         3       51            0      [idle]
1907    2.3M    none                  monitor        0           0         2       0             0      [idle]
1908    2.34M   none                  redis_consumer 2           0         5       579           0      [idle]
1909    2.58M   none                  redis_consumer 2           0         5       578           0      [idle]
1910    2.33M   none                  redis_consumer 2           0         5       579           0      [idle]
1911    2.33M   none                  redis_consumer 2           0         5       579           0      [idle]
----------------------------------------------PROCESS STATUS---------------------------------------------------
Summary 14M     -                     -              9           0         25      2366          0      [Summary] 

另外得明天复现问题再执行这个,得明天再来了,因为今天复现不了了,呜呜呜呜,就很奇怪
sudo strace -ttp 1906

另外一个命令结果

# sudo lsof -np 1906
COMMAND  PID USER   FD      TYPE DEVICE SIZE/OFF   NODE NAME
php     1906 root  cwd       DIR  254,1     4096 385309 /home/www/ai
php     1906 root  rtd       DIR  254,1     4096      2 /
php     1906 root  txt       REG  254,1 38950568    389 /usr/local/bin/php
php     1906 root  DEL       REG    0,1            1040 /dev/zero
php     1906 root  mem       REG  254,1     3552   5500 /usr/share/zoneinfo/America/New_York
php     1906 root    0u      CHR  136,1      0t0      4 /dev/pts/1 (deleted)
php     1906 root    1u      CHR  136,1      0t0      4 /dev/pts/1 (deleted)
php     1906 root    2u      CHR  136,1      0t0      4 /dev/pts/1 (deleted)
php     1906 root    3u      REG  254,1        0    323 /tmp/.ZendSem.jhBEFc (deleted)
php     1906 root    4r      REG  254,1       92 387365 /home/www/ai/start.php
php     1906 root    5u      CHR  136,1      0t0      4 /dev/pts/1 (deleted)
php     1906 root    6w      REG  254,1        0 521462 /home/www/ai/runtime/logs/stdout.log
php     1906 root    7w      REG  254,1        0 521462 /home/www/ai/runtime/logs/stdout.log
php     1906 root    8u  a_inode   0,14        0     21 [eventpoll:9,10]
php     1906 root    9u     IPv4  26233      0t0    TCP 127.0.0.1:8341 (LISTEN)
php     1906 root   10r     FIFO   0,13      0t0  26241 pipe
php     1906 root   11w     FIFO   0,13      0t0  26241 pipe
php     1906 root   13u     IPv4  26367      0t0    TCP 127.0.0.1:59590->127.0.0.1:redis (ESTABLISHED)
php     1906 root   14u     IPv4  26368      0t0    TCP 127.0.0.1:42390->127.0.0.1:mysql (ESTABLISHED)
php     1906 root   15u     IPv4  26370      0t0    TCP 127.0.0.1:15336->127.0.0.1:mysql (ESTABLISHED)
php     1906 root   16u     IPv4  26373      0t0    TCP 127.0.0.1:15370->127.0.0.1:mysql (ESTABLISHED)

麻烦各位大佬帮忙查看下,谢谢

122 0 0
0个回答

×
🔝