How to fix FastCGI timeout issues in Plesk?

Gary picture Gary · Dec 16, 2012 · Viewed 25.5k times · Source

PHP support is currently set to: run as Fast CGI.

I keep getting these errors in my server log:

mod_fcgid: read data timeout in 45 seconds

Premature end of script headers: index.php

Should be quick fix I think, but I cant find the file to edit. Is this something I can change from Plesk.

Anyone know how to increase the timeout?

Answer

kenorb picture kenorb · Apr 7, 2016

In Plesk 12.x and similar go to Web Server Settings and set the following directives:

Additional directives for HTTP & HTTPS

FcgidBusyTimeout 300
FcgidIOTimeout 250

Above lines will change the timeout for scripts that are quiet too long and take too long to execute.

Additional nginx directives

proxy_read_timeout 300;

Above lines will change the proxy timeout.

If the problem persist, increase the values.

See also: Premature end of script headers: index.php, mod_fcgid: read data timeout


Check the screenshots for the guidance:

Plesk 12.x - Web Server Settings - Additional Apache directives: Additional directives for HTTP & HTTPS - FcgidBusyTimeout & FcgidIOTimeout

Plesk 12.x - Web Server Settings - Additional nginx directives - proxy_read_timeout