timeoutpleskmod-fcgid

mod_fcgid: read data timeout in 45 seconds and Premature end of script headers: index.php


One of my website clients had issues while placing orders. When I checked my error log I could see this :

[warn]  mod_fcgid: read data timeout in 45 seconds, referer: https://myDomain/cart
[error] Premature end of script headers: index.php, referer: https://myDomain/cart 

What does this error mean? What should I do to eliminate this error? Are there any settings to be changed in Plesk Control panel? will it be solved if I change 'max_execution_time' in 'Php settings' to 3600?

I am using Plesk 12.0.18, CentOS 5.11


Solution

  • The error means that website code in index.php file fails to be executed in the time limit, which set for Apache FastCGI module and/or PHP.

    1. Set max_execution_time to 120 in Plesk > Domains > example.com > PHP settings.

    2. Increase FastCGI timeout by adding the following Apache dirctives in Plesk > Domains > example.com > Apache & Nginx settings > Additional Apache directives:

    <IfModule mod_fcgid.c> 
    FcgidIOTimeout 120 
    </IfModule>