Symptoms
The following message appears on the domain's Logs page at Plesk > Domains > example.com > Logs or in the domain's error log file
/var/www/vhosts/system/example.com/logs/error_log:mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
Websites are loading very slow or loading continuously and eventually fail with an 50x error in a web-browser:
500 external Server
502 Bad Gateway
503 Service Temporarily Unavailable
504 Gateway Time-out.
ActiveSync connections with Microsoft Outlook email client are timing out
Cause
The Apache FcgidMaxProcesses limit (the total number of processes FCGID will start for all users) has been reached.
Resolution
Connect to the Plesk server via SSH.
Increase the value of
FcgidMaxProcessesandFcgidMaxProcessesPerClass:2.1. Open the
fcgid.conffile in a text editor:on CentOS/RHEL-based distributions:
# vi /etc/httpd/conf.d/fcgid.conf
on Debian/Ubuntu-based distributions:
# vi /etc/apache2/mods-enabled/fcgid.conf
2.2. Navigate to the directive
FcgidMaxProcessesand increase its value. General recommendations: RAM 8GB - about 150, RAM 16GB - 3002.3. Navigate to the directive
FcgidMaxProcessesPerClassand increase its value to 10 or 152.4. Save the changes and close the file
Make sure no other files in the Apache configuration directory override the parameters in
fcgid.confusing this command:on CentOS/RHEL-based distributions:
# grep -irE 'FcgidMaxProcesses|FcgidMaxProcessesPerClass' /etc/httpd/conf.d/
on Debian/Ubuntu-based distributions:
# grep -irE 'FcgidMaxProcesses|FcgidMaxProcessesPerClass' /etc/apache2/
If files other than fcgid.conf are found, increase the
FcgidMaxProcessesandFcgidMaxProcessesPerClasslimit in these files too.
Restart Apache to apply the changes:
on CentOS/RHEL-based distributions:
# service httpd restart
on Debian/Ubuntu-based distributions:
# service apache2 restart