Plesk

Websites on PHP-FPM are not available and there is a php-fpm process that consumes 100% CPU on Plesk server

Symptoms

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:

  1. Log in to Plesk.

    Note: change the "X.X.X PHP handler" to the correct PHP version.

  2. Go to Tools & Settings > PHP Settings > X.X.X PHP application

  3. 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:

How to customize PHP settings in Plesk?

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:

    1. Log in to Plesk

    2. Go to Service Plans > Default > PHP Settings

      Note: change the "Default" service plan name in the path above to the correct one.

    3. Add the following value at the end of the disable_functions field:

      kill_all_lockers

    4. 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

    5. Press the Update & Sync button

  • For subscription and for locked subscriptions:

    1. Log in to Plesk

    2. Go to Subscriptions > example.com > PHP Settings

    3. Add the following value at the end of the disable_functions field:

      kill_all_lockers

    4. 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();";

Exit mobile version