View Full Version : Server Stops Loading PHP After 5 Minutes??? Page Stops Loading, PHP Continues

06-02-2010, 01:22 AM
I recently had some work done on my server and since the alterations something has changed although I am not too sure what setting it is.

Before the change I can load a PHP file that loops, E.g.

while ($i<10000000000){
echo $i;

So this is pretty much an endless loop, it would take 10000000000 seconds to complete.

What happens now with a script like this is after 5 minutes the browser stops loading BUT the PHP continues to run. I can tell because I can see the MySQL queries continuing to update.

The issue is not with my browser as on another server the same script works fine, it is just a server option somewhere has changed to timeout user connections, any ideas which one it may be?

06-02-2010, 05:13 AM
There are timeout settings in Apache for how long it will keep a connection open before it times out. Perhaps someone lowered the time?

Though I feel compelled to mention that if you have a script that is taking 5+ minutes to run perhaps it should be ran via a shell script instead of through the browser. But that depends on what it is doing.