What version of Swoole are you using (show your php --ri swoole)?
Swoole => enabled
Author => Swoole Team team@swoole.com
Version => 5.1.3
Built => Jun 6 2024 10:37:52
coroutine => enabled with boost asm context
trace_log => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.0.2k-fips 26 Jan 2017
http2 => enabled
json => enabled
pcre => enabled
c-ares => 1.32.1
zlib => 1.2.7
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled
coroutine_odbc => enabled
coroutine_sqlite => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_fiber_mock => Off => Off
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) ?
CentOS Linux release 7.9.2009 3.10.0-1160.119.1.el7.x86_64
Mem : 256G
CPU : 128C
PHP 8.3.8 (cli) (built: Jun 4 2024 14:53:17) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.8, Copyright (c) Zend Technologies
with Zend OPcache v8.3.8, Copyright (c), by Zend Technologies
Please answer these questions before submitting your issue.
使用swoole coroutine+task完成日均百万级数量耗时任务处理,在任务开启一段时间后,出现如下错误。
[2024-07-18 05:48:45 *4002142.5] WARNING Worker_reactor_try_to_exit() (ERRNO 9101): worker exit timeout, forced termination
[2024-07-18 06:03:48 #4001610.0] WARNING Manager::kill_timeout_process() (ERRNO 9101): worker(pid=4002016, id=454) exit timeout, force kill the process
[2024-07-18 14:24:20 ^913338.268] WARNING TaskWorker_onPipeReceive(): read(1056, 8192) failed, Error: Resource temporarily unavailable[11]
[2024-07-18 14:24:20 ^913338.268] WARNING ReactorEpoll::wait(): EPOLLIN handle failed. fd=1056, Error: Resource temporarily unavailable[11]
/var/log/messages 中没有异常日志,也没有出现core-dump,只是在log_file
中出现这种WARNINGphp --ri swoole
)?Swoole => enabled Author => Swoole Team team@swoole.com Version => 5.1.3 Built => Jun 6 2024 10:37:52 coroutine => enabled with boost asm context trace_log => enabled epoll => enabled eventfd => enabled signalfd => enabled cpu_affinity => enabled spinlock => enabled rwlock => enabled sockets => enabled openssl => OpenSSL 1.0.2k-fips 26 Jan 2017 http2 => enabled json => enabled pcre => enabled c-ares => 1.32.1 zlib => 1.2.7 mutex_timedlock => enabled pthread_barrier => enabled futex => enabled mysqlnd => enabled async_redis => enabled coroutine_odbc => enabled coroutine_sqlite => enabled Directive => Local Value => Master Value swoole.enable_coroutine => On => On swoole.enable_library => On => On swoole.enable_fiber_mock => Off => Off swoole.enable_preemptive_scheduler => Off => Off swoole.display_errors => On => On swoole.use_shortname => On => On swoole.unixsock_buffer_size => 8388608 => 8388608
uname -a
&php -v
&gcc -v
) ? CentOS Linux release 7.9.2009 3.10.0-1160.119.1.el7.x86_64 Mem : 256G CPU : 128CPHP 8.3.8 (cli) (built: Jun 4 2024 14:53:17) (NTS gcc x86_64) Copyright (c) The PHP Group Zend Engine v4.3.8, Copyright (c) Zend Technologies with Zend OPcache v8.3.8, Copyright (c), by Zend Technologies
COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.3.1-20190311/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
[PHP Modules] ast bcmath brotli bz2 calendar Core ctype curl date dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv igbinary imagick imap intl json ldap libxml mbstring mcrypt msgpack mysqli mysqlnd odbc openssl pcntl pcre PDO pdo_mysql PDO_ODBC pdo_sqlite Phar posix random readline redis Reflection session shmop SimpleXML soap sockets sodium SPL sqlite3 standard swoole sysvmsg sysvsem sysvshm tokenizer xlswriter xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache