swoole-src
swoole-src copied to clipboard
WARNING Worker_reactor_try_to_exit() (ERRNO 9101): worker exit timeout, forced termination
Please answer these questions before submitting your issue.
- What did you do? If possible, provide a simple script for reproducing the error. 看文档说明,这个是因为 在约定的时间 (max_wait_time 秒) 内此 Worker 没有退出,Swoole 底层强行终止此进程。
我这边设置了: 'reload_async' => true, 'max_wait_time' => 10, 'max_request' => 50000,
-
What did you expect to see? 是不是调大max_wait_time的时间,可以在一定程度上避免这种警告?
-
What did you see instead? WARNING Worker_reactor_try_to_exit() (ERRNO 9101): worker exit timeout, forced termination

-
What version of Swoole are you using (show your
php --ri swoole)? php7.2 swoole4.8.8 -
What is your machine environment used (show your
uname -a&php -v&gcc -v) ?
是的,但是最好看一下代码,因为max_wait_time设置为10秒这么长都出现这个警告,而且有死锁发生。
注册onWorkerExit事件回调,然后在这个函数中清理进程内的定时器、任务协程、事件监听等可能会挂起进程的逻辑