Plesk

Increased memory usage by PHP-CGI processes on server after Plesk update

Symptoms

Cause

PHP-CGI processes are consuming too much memory due to big timeout values in FastCGI configuration.

Resolution

Solution 1

  1. Connect to the server via SSH

  2. Open /etc/httpd/conf.d/fcgid.conf in any text editor

  3. Decrease timeouts to lower values to finish php-cgi processes earlier, and execute service httpd reload command to reload Apache configuration. Default values are:

    FcgidIdleTimeout 40
    FcgidProcessLifeTime 30
    FcgidMaxProcesses 20
    FcgidConnectTimeout 30
    FcgidIOTimeout 45
    FcgidIdleScanInterval 10

    Note: The drawback of this solution is the possible failure of long-running PHP scripts. If you are sure that there is no any on the server, you can follow this option.

Solution 2

Log in to Plesk, go to Domains > example.com > PHP settings and set PHP version to 7.0.33 and handler to FPM application served by nginx:

Perform these configuration changes for every domain one by one.

Note: The drawback of this solution is possible websites' downtime due to switching to nginx. For example, domain-level .htaccess files can not be handled anymore, that can lead to website downtime. That's why it was recommended to switch the websites one by one, checking their availability.

Exit mobile version