Hi,
I've detected that after proxy_fcgi timeouts (this is the expected behavior), PHP-FPM does not and continues processing in the background, apparently indefinitely.
To test this out, I've created a simply PHP script that executes an infinite loop and creates 100% CPU usage continuously.
I've tried adding "request_terminate_timeout: 10" into /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml, reconfiguring with /usr/local/cpanel/scripts/php_fpm_config --rebuild and restarting apache_phpfpm. The parameter is loaded because In the log the child is killed after 10 seconds:
But the php-fpm processes are stuck in 100% (see attached image).
How can I set up a timeout for the PHP-FPM processes?
Thanks!,
Ignacio
I've detected that after proxy_fcgi timeouts (this is the expected behavior), PHP-FPM does not and continues processing in the background, apparently indefinitely.
To test this out, I've created a simply PHP script that executes an infinite loop and creates 100% CPU usage continuously.
I've tried adding "request_terminate_timeout: 10" into /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml, reconfiguring with /usr/local/cpanel/scripts/php_fpm_config --rebuild and restarting apache_phpfpm. The parameter is loaded because In the log the child is killed after 10 seconds:
Code:
# tail /opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log
[13-May-2020 16:33:21] WARNING: [pool whmcs7_duckhunt_com] child 11636, script '/home/whmcs7duckhunt/public_html/burn.php' (request: "GET /burn.php?nocache") execution timed out (10.191141 sec), terminating
[13-May-2020 16:33:21] WARNING: [pool whmcs7_duckhunt_com] child 11636 exited on signal 15 (SIGTERM) after 10.197354 seconds from start
[13-May-2020 16:33:21] NOTICE: [pool whmcs7_duckhunt_com] child 11647 started
How can I set up a timeout for the PHP-FPM processes?
Thanks!,
Ignacio
Attachments
-
220.3 KB Views: 5