Symptoms
-
Websites on Plesk using PHP-FPM handler hangs and might consume 100% CPU
-
A restart of the PHP-FPM service fixes the issue temporarily
-
The following error appears in the PHP-FPM error log (i.e.
/var/log/plesk-php72-fpm/error.log
):WARNING: [pool example.com] child 5023 said into stderr: "(5023): Error Cannot kill process 2349: Operation not permitted!"
Cause
This is a PHP-FPM bug #74709.
Resolution
This bug was fixed for several PHP versions shipped with Plesk in Obsidian 18.0.34.
It is recommended to update Plesk to the latest release and switch PHP handlers to 7.4.16 or 8.0.3.
Note: As soon as a new version of 7.3 is released, it will get this fix in Plesk as well.
If the update is not possible for some reason or PHP by OS vendor is required, the following workarounds can be applied:
Disable OPCache module for the necessary PHP version:
-
Note: change the "X.X.X PHP handler" to the correct PHP version.
-
Go to Tools & Settings > PHP Settings > X.X.X PHP application
-
Uncheck the opcache checkbox and press the OK button.
If OPCache is necessary, switch the domains to another PHP handler, e.g. to FastCGI:
For many domains, it is recommended to manage PHP handlers via a service plan.
For locked subscriptions, changes have to be done per subscription.
All cases are described in the following article:
Forbid calling the "kill_all_lockers" function
Note: it is not possible to manage the disable_functions directive via the php.ini
configuration file, because Plesk will overwrite them.
-
For a service plan:
-
Go to Service Plans > Default > PHP Settings
Note: change the "Default" service plan name in the path above to the correct one.
-
Add the following value at the end of the disable_functions field:
kill_all_lockers
-
Navigate to the Permissions tab and make sure that the Hosting settings management and Common PHP settings management permissions are not granted, otherwise, PHP settings will not be applied
-
Press the Update & Sync button
-
For subscription and for locked subscriptions:
-
Go to Subscriptions > example.com > PHP Settings
-
Add the following value at the end of the disable_functions field:
kill_all_lockers
-
Click the OK button
Note: OPCache can be reset by the function opcache_reset()
. For instance:
# /opt/plesk/php/7.2/bin/php -r "opcache_reset();";