Applicable to:
- Plesk for Linux
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
):CONFIG_TEXT: WARNING: [pool example.com] child 5023 said into stderr: "(5023): Error Cannot kill process 2349: Operation not permitted!"
The strace utility to the php-fpm
process shows the following output:
# strace -p39053
strace: Process 39053 attached
kill(39005, SIGKILL) = -1 EPERM (Operation not permitted)
fcntl(4, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=39005}) = 0
kill(39005, SIGKILL) = -1 EPERM (Operation not permitted)
fcntl(4, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=39005}) = 0
kill(39005, SIGKILL) = -1 EPERM (Operation not permitted)
fcntl(4, F_GETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1, l_pid=39005}) = 0
kill(39005, SIGKILL) = -1 EPERM (Operation not permitted)
Such infinite loops arise on PHP below version 7.0 only
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:
-
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.
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:
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:
CONFIG_TEXT: 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:
CONFIG_TEXT: 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();";
Comments
0 comments
Please sign in to leave a comment.