So, I am running a PHP script on my virtual godaddy server (I do not hate it), which I expect to spend about 5 minutes to complete the execution. A script is a CURLing page, but it never contains more than one page at a time (this is done in a loop that reuses the same variable). I changed the php5.ini file to the following:
max_execution_time = 600
max_input_time = 120
memory_limit = 64M
I checked through phpinfo that the ini file changes took effect, however I get an Apache 500 error after 120 seconds. Here is the error log for this time:
[Wed Jul 11 22:08:52 2012] [warn] [client **.**.**.***] mod_fcgid: read data timeout in 120 seconds
[Wed Jul 11 22:08:52 2012] [error] [client **.**.**.***] Premature end of script headers: test.php
If anyone has any ideas on why I might get these errors or any suggestion on how to try, I would appreciate help. I noticed a parameter in php settings set to 120, but I'm not sure if this will have an effect: realpath_cache_tt
I also set a time limit in the .php file: set_time_limit (600);
Thanks in advance.
UPDATE:
Here is what I tried in the .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
<IfModule mod_fcgid.c>
IPCCommTimeout 7200
</IfModule>
Causes an Apache 500 error while loading any page.
I also disabled FastCGI, but the problem is still happening.
DECIDED
RobB suggested the following: IPCCommTimeout 7200 What should have worked, however, due to my sharing of godaddy, this is forbidden. Time to find a new hosting.
source
share