Symptoms
-
Unable to download a large file from a website hosted on Plesk.
-
Downloading speed is not high.
-
Proxy mode is enabled in Plesk > Domains > example.com > Apache & Nginx Settings.
-
PHP handler set to FastCGI application server by Apache.
-
Records like the following can be found in
/var/www/vhosts/example.com/logs/error_log
:[fcgid:warn] [pid 13949] (104)Connection reset by peer: [client 203.0.113.2:43210] mod_fcgid: error reading data from FastCGI server, referer: https://example.com/index.php
[fcgid:warn] [pid 13949] (104)Connection reset by peer: [client 203.0.113.2:43210] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: https://example.com/index.php
Cause
Insufficient FastCGI limits.
Resolution
-
Go to Domains > example.com > PHP Settings.
-
Increase the
max_execution_time
value. -
Go to Domains > example.com > Apache & Nginx Settings.
-
Add the following directives under Additional directives for HTTP & Additional directives for HTTPS:
<IfModule mod_fcgid.c>
FcgidMaxRequestsPerProcess 500
FcgidBusyTimeout 3600
FcgidMaxRequestLen 1073741824
FcgidProcessLifeTime 7200
</IfModule>