Premature end of script headers: index.php, mod_fcgid: read data timeout in 61 seconds

Bilal Gultekin picture Bilal Gultekin · Jan 23, 2013 · Viewed 45k times · Source

I wrote a simple crawling script (in php) at localhost (with 4 variations). All of them worked fine at localhost. But when I made move them to shared hosting, two of them worked others gave internal server error. I looked at error_log and I saw these line:

[Wed Jan 23 22:01:02 2013] [warn] [client ***] mod_fcgid: read data timeout in 61 seconds
[Wed Jan 23 22:01:02 2013] [error] [client ***] Premature end of script headers: index.php

I searched but I couldn't find any useful result. What is related to these errors? Any ideas?

Answer

trante picture trante · Apr 10, 2013

If you can access Linux server please edit /etc/httpd/conf.d/fcgid.conf file with vim.
Change FcgidIOTimeout 45 to FcgidIOTimeout 600.
Restart Apache.
Then Fast CGI timeout will be solved.