swoole-src
swoole-src copied to clipboard
高频次向客户端推送数据包导致Worker进程异常重启,strace显示部分错误信息
Please answer these questions before submitting your issue.
- What did you do? If possible, provide a simple script for reproducing the error.

-
What did you expect to see?
-
What did you see instead?
-
What version of Swoole are you using (show your
php --ri swoole)?
Swoole => enabled Author => Swoole Team [email protected] Version => 4.8.9 Built => Jul 26 2022 10:08:21 coroutine => enabled with boost asm context epoll => enabled eventfd => enabled signalfd => enabled spinlock => enabled rwlock => enabled zlib => 1.2.12 brotli => E16777225/D16777225 mutex_timedlock => enabled pthread_barrier => enabled async_redis => enabled
Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608
- What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
Linux 9725928c2272 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 Linux
模拟频繁推送消息至客户端,最终Worker进程重启


看看是否设置了max_request导致worker进程达到最大处理数然后退出重启
应该是设置了 SIGALAM 时钟,进程被时钟信号杀死了。可以使用 pcntl_signal 或者 Process::signal 设置 SIGALAM 的 handler
应该是设置了 SIGALAM 时钟,进程被时钟信号杀死了。可以使用 pcntl_signal 或者 Process::signal 设置 SIGALAM 的 handler
请问要如何设置才可以让Worker进程不关闭?
了
应该是设置了 SIGALAM 时钟,进程被时钟信号杀死了。可以使用 pcntl_signal 或者 Process::signal 设置 SIGALAM 的 handler
\Swoole\Process::signal(SIGALAM, null); 设置了之后依旧进程退出