- Plesk for Linux
The memory usage increased after installing Plesk updates.
RAM is used by dozens of
php-cgiprocesses started by Apache:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26267 johndoe+ 20 0 810324 72704 3372 S 0.0 0.5 0:01.62 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example.com/etc/php.ini
10022 janedoe+ 20 0 809084 71940 2108 S 0.7 0.5 0:01.72 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example1.com/etc/php.ini
996 jadedoe+ 20 0 814800 68728 10556 S 0.0 0.5 0:04.24 /opt/plesk/php/5.3/bin/php-cgi -c /var/www/vhosts/system/example2.com/etc/php.ini
Very big timeouts are specified in
PHP-CGI processes are consuming too much memory due to big timeout values in FastCGI configuration.
Click on a section to expand
Connect to the server via SSH
/etc/httpd/conf.d/fcgid.confin any text editor
Decrease timeouts to lower values to finish
php-cgiprocesses earlier, and execute
service httpd reloadcommand to reload Apache configuration. Default values are:
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.
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.
Can I changed the service plan with the suggestion 2? Will be the change applied to domains associates?
If you want to change PHP version and handler in Service Plan and apply it to all the subscription associated with it then proceed with the following:
1. Ensure that option "PHP version and handler management" is unchecked at the Home > Service Plans > Service plan name > Permissions.
2. Change PHP setting at Home > Service Plans > Service plan name > PHP Settings.
3. Press Update & Sync button.
After that PHP Settings changes will be applied to all the synced subscription which associated with the affected Service Plan.
Please sign in to leave a comment.