PHP maximum execution time

trante picture trante · Mar 19, 2013 · Viewed 15.7k times · Source

In my Plesk 11, PHP 5.4.7. Apache/2.4.3 system, when I make cron jobs I get this error from error.log file.

[Tue Mar 19 21:33:18 2013] [warn] [client 88.44.55.66] mod_fcgid: read data timeout in 45 seconds
[Tue Mar 19 21:33:18 2013] [error] [client 88.44.55.66] Premature end of script headers: index.php

So I checked for execution time with this:

echo ini_get('max_execution_time');

I got this value: 1560000

It doesn't seem a timeout problem but I get timeout error?

Answer for the future reference:
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.

Answer

rid picture rid · Mar 19, 2013

That's a mod_fcgid timeout, not a PHP timeout. Take a look at the mod_fcgid documentation to find out how to change it, especially at FcgidIOTimeout.