Bad connection / maximum execution time exceeded PHP?

Bad connection / maximum execution time exceeded PHP?

am 19.12.2007 13:19:36 von Csaba

Hello all,
I am looking into issues with time-outs on a website.
These appear to happen in a random way for some users.

This is one example:

Fatal error: Maximum execution time of 60 seconds exceeded in
[snipped_path] auth.php on line 5

auth.php contains:

1 2 // Login & Session
3 // auth.php
4
5 // start session
6 session_start();

auth.php gets included like this:
1

These timeouts occur sometimes when users from far away (China) use
the website.
The users are known for having an unreliable internet connection at
times.
I have never had these timeouts myself, and can not reproduce any of
them.
The timeouts seem to appear in random places spread across the site,
there does not seem to be a pattern here.

All docs I have here on PHP say that the max execution time is only
the time spent by the PHP interpreter, and does not include the time
sending the data back to the user. So that would suggest there is
something going wrong in the PHP, but I can never find anything
related to that. In this case the error is on or close to lines that
are comments...

My question now is:
Is there any way that a bad internet connection can cause these
time-outs?
Is there something I can do to solve it, or improve it?
I do not use any output buffering in PHP now, would it make a
difference in these cases?

Thanks already,

Richard.

Re: Bad connection / maximum execution time exceeded PHP?

am 19.12.2007 13:38:13 von Vanscot

I guess that you're including a file that takes longer to execute,
you should check all your includes looking for a while o a connection
that takes too long, never ends or keeps idling until the script hits
the max exec time.

By the way, if you find a way to catch that kind of errors, max exec
time,
post it, since I need a way to die elegant on that.

On Dec 19, 9:19 am, "Richard" wrote:
> Hello all,
> I am looking into issues with time-outs on a website.
> These appear to happen in a random way for some users.
>
> This is one example:
>
> Fatal error: Maximum execution time of 60 seconds exceeded in
> [snipped_path] auth.php on line 5
>
> auth.php contains:
>
> 1 > 2 // Login & Session
> 3 // auth.php
> 4
> 5 // start session
> 6 session_start();
>
> auth.php gets included like this:
> 1
>
> These timeouts occur sometimes when users from far away (China) use
> the website.
> The users are known for having an unreliable internet connection at
> times.
> I have never had these timeouts myself, and can not reproduce any of
> them.
> The timeouts seem to appear in random places spread across the site,
> there does not seem to be a pattern here.
>
> All docs I have here on PHP say that the max execution time is only
> the time spent by the PHP interpreter, and does not include the time
> sending the data back to the user. So that would suggest there is
> something going wrong in the PHP, but I can never find anything
> related to that. In this case the error is on or close to lines that
> are comments...
>
> My question now is:
> Is there any way that a bad internet connection can cause these
> time-outs?
> Is there something I can do to solve it, or improve it?
> I do not use any output buffering in PHP now, would it make a
> difference in these cases?
>
> Thanks already,
>
> Richard.

Re: Bad connection / maximum execution time exceeded PHP?

am 19.12.2007 14:18:48 von Csaba

"Vanscot" wrote in message
news:5d60f466-89f5-4cdf-be10-03d0a02f10c8@s19g2000prg.google groups.com...

> On Dec 19, 9:19 am, "Richard" wrote:
>> Hello all,
>> I am looking into issues with time-outs on a website.
>> These appear to happen in a random way for some users.
>>
>> This is one example:
>>
>> Fatal error: Maximum execution time of 60 seconds exceeded in
>> [snipped_path] auth.php on line 5
>>
>> auth.php contains:
>>
>> 1 >> 2 // Login & Session
>> 3 // auth.php
>> 4
>> 5 // start session
>> 6 session_start();
>>
>> auth.php gets included like this:
>> 1
>>
>> These timeouts occur sometimes when users from far away (China)
>> use
>> the website.
>> The users are known for having an unreliable internet connection at
>> times.
>> I have never had these timeouts myself, and can not reproduce any
>> of
>> them.
>> The timeouts seem to appear in random places spread across the
>> site,
>> there does not seem to be a pattern here.
>>
>> All docs I have here on PHP say that the max execution time is only
>> the time spent by the PHP interpreter, and does not include the
>> time
>> sending the data back to the user. So that would suggest there is
>> something going wrong in the PHP, but I can never find anything
>> related to that. In this case the error is on or close to lines
>> that
>> are comments...
>>
>> My question now is:
>> Is there any way that a bad internet connection can cause these
>> time-outs?
>> Is there something I can do to solve it, or improve it?
>> I do not use any output buffering in PHP now, would it make a
>> difference in these cases?
>>
>> Thanks already,
>>
>> Richard.

>I guess that you're including a file that takes longer to execute,
> you should check all your includes looking for a while o a
> connection
> that takes too long, never ends or keeps idling until the script
> hits
> the max exec time.
>
> By the way, if you find a way to catch that kind of errors, max exec
> time,
> post it, since I need a way to die elegant on that.
>

Hi,
thanks for the reply, but there is nothing more to this particular
timeout than I mentioned.
This is the only include, it gets included on the first line of the
first php page....

Richard.