I have a php page that runs a number of loops and queries and database updates etc. It can take some time to run and after a minute, I get the 500 Internal Server Error. I don't have access to the logs but my hosting service has forwarded a copy and it seems that it is a timeout related error:
mod_fcgid: read data timeout in 60 seconds
I have included:
ini_set('max_execution_time', 9000);
set_time_limit(0);
In the php page but it still causes the 500 error. I can't access any of the config files. Is there any other way I can increase the timeout for this page?
I have also tried putting
set_time_limit(59);
at the start of each loop through. If this is meant to reset the clock then I can't see that I should have a problem but the error persists.
NOTE: I am 99% sure that it is not an error in the script itself as sometimes it goes through and other times times it doesn't with exactly the same data.