Script halts after 60 minutes

Script halts after 60 minutes

am 01.02.2008 00:07:54 von Mikhail Kovalev

Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
\localhost\www\somefile.php on line 138

php.ini setting fixes default max execution time at 30 sec,
In the script itself I have set_time_limit(0);
I have also tried set_time_limit(90000); with no luck.

Checked if php was running in safe mode, and it wasn't.

Are there any other reasons that can cause this behavior?

Thanks!

mvh
MK

Re: Script halts after 60 minutes

am 01.02.2008 00:43:37 von Mikhail Kovalev

And, a funny thing I think it always halts at the same line, which
looks like this:

$string_2 = file_get_contents($string_1);

Re: Script halts after 60 minutes

am 01.02.2008 00:52:18 von axlq

In article ,
Mikhail Kovalev wrote:
>And, a funny thing I think it always halts at the same line, which
>looks like this:
>
> $string_2 = file_get_contents($string_1);

Try

echo $string1."\n";

That might explain what's happening. You may be trying to access a
locked file, and get a time-out while waiting for release.

-A

Re: Script halts after 60 minutes

am 01.02.2008 01:23:08 von Mikhail Kovalev

On 1 Feb, 00:52, a...@spamcop.net (axlq) wrote:
> In article om>,
> Mikhail Kovalev =A0 wrote:
>
> >And, a funny thing I think it always halts at the same line, which
> >looks like this:
>
> > =A0 =A0$string_2 =3D file_get_contents($string_1);
>
> Try
>
> echo $string1."\n";
>
> That might explain what's happening. =A0You may be trying to access a
> locked file, and get a time-out while waiting for release.
>
> -A

$string_1 is an url address, or hundreds of different, but similar
(same host) url address which are opened after each other. I know at
least some of them are working as I am able to watch the script
progress. I guess the reason it halts at this line is because
file_get_contents($string_1) usually takes around 1 second, while all
other following commands are just milliseconds. Statistically it makes
sence.

Basically, my problem is to get the script work longer than 3600
seconds

A friend of mine uses same script on a Mac OS X 10.5 with PHP 5.?.?,
with no problems

Re: Script halts after 60 minutes

am 01.02.2008 03:47:31 von Jerry Stuckle

Mikhail Kovalev wrote:
> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
> \localhost\www\somefile.php on line 138
>
> php.ini setting fixes default max execution time at 30 sec,
> In the script itself I have set_time_limit(0);
> I have also tried set_time_limit(90000); with no luck.
>
> Checked if php was running in safe mode, and it wasn't.
>
> Are there any other reasons that can cause this behavior?
>
> Thanks!
>
> mvh
> MK
>

Does your server have a timeout value specified?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Script halts after 60 minutes

am 01.02.2008 19:50:29 von Mikhail Kovalev

On 1 Feb, 03:47, Jerry Stuckle wrote:
> Mikhail Kovalev wrote:
> > Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
> > \localhost\www\somefile.php on line 138
>
> > php.ini setting fixes default max execution time at 30 sec,
> > In the script itself I have set_time_limit(0);
> > I have also tried set_time_limit(90000); with no luck.
>
> > Checked if php was running in safe mode, and it wasn't.
>
> > Are there any other reasons that can cause this behavior?
>
> > Thanks!
>
> > mvh
> > MK
>
> Does your server have a timeout value specified?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Timeout 300 in httpd.conf?

Re: Script halts after 60 minutes

am 01.02.2008 20:16:11 von Jerry Stuckle

Mikhail Kovalev wrote:
> On 1 Feb, 03:47, Jerry Stuckle wrote:
>> Mikhail Kovalev wrote:
>>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
>>> \localhost\www\somefile.php on line 138
>>> php.ini setting fixes default max execution time at 30 sec,
>>> In the script itself I have set_time_limit(0);
>>> I have also tried set_time_limit(90000); with no luck.
>>> Checked if php was running in safe mode, and it wasn't.
>>> Are there any other reasons that can cause this behavior?
>>> Thanks!
>>> mvh
>>> MK
>> Does your server have a timeout value specified?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Timeout 300 in httpd.conf?
>

I wouldn't think that would give a 3600 second timeout. Are you running
PHP as a module or a CGI? What does phpinfo() show you for your timeout
value?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Script halts after 60 minutes

am 01.02.2008 20:32:57 von Mikhail Kovalev

On 1 Feb, 20:16, Jerry Stuckle wrote:
> Mikhail Kovalev wrote:
> > On 1 Feb, 03:47, Jerry Stuckle wrote:
> >> Mikhail Kovalev wrote:
> >>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\hom=
e
> >>> \localhost\www\somefile.php on line 138
> >>> php.ini setting fixes default max execution time at 30 sec,
> >>> In the script itself I have set_time_limit(0);
> >>> I have also tried set_time_limit(90000); with no luck.
> >>> Checked if php was running in safe mode, and it wasn't.
> >>> Are there any other reasons that can cause this behavior?
> >>> Thanks!
> >>> mvh
> >>> MK
> >> Does your server have a timeout value specified?
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> > Timeout 300 in httpd.conf?
>
> I wouldn't think that would give a 3600 second timeout. =A0Are you running=

> PHP as a module or a CGI? =A0What does phpinfo() show you for your timeout=

> value?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

http://07db0bc537297586.paste.se/

Timeouts Connection: 300 - Keep-Alive: 15
Is this it

Re: Script halts after 60 minutes

am 01.02.2008 20:55:57 von Jerry Stuckle

Mikhail Kovalev wrote:
> On 1 Feb, 20:16, Jerry Stuckle wrote:
>> Mikhail Kovalev wrote:
>>> On 1 Feb, 03:47, Jerry Stuckle wrote:
>>>> Mikhail Kovalev wrote:
>>>>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
>>>>> \localhost\www\somefile.php on line 138
>>>>> php.ini setting fixes default max execution time at 30 sec,
>>>>> In the script itself I have set_time_limit(0);
>>>>> I have also tried set_time_limit(90000); with no luck.
>>>>> Checked if php was running in safe mode, and it wasn't.
>>>>> Are there any other reasons that can cause this behavior?
>>>>> Thanks!
>>>>> mvh
>>>>> MK
>>>> Does your server have a timeout value specified?
>>>> --
>>>> ==================
>>>> Remove the "x" from my email address
>>>> Jerry Stuckle
>>>> JDS Computer Training Corp.
>>>> jstuck...@attglobal.net
>>>> ==================
>>> Timeout 300 in httpd.conf?
>> I wouldn't think that would give a 3600 second timeout. Are you running
>> PHP as a module or a CGI? What does phpinfo() show you for your timeout
>> value?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> http://07db0bc537297586.paste.se/
>
> Timeouts Connection: 300 - Keep-Alive: 15
> Is this it
>

It looks like you're running PHP as a CGI, not a module. Do you have a
timeout set for your CGI's? For instance, if you're using FastCGI it is
an option there, IIRC.

BTW - why are you running PHP as a CGI instead of a module?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Script halts after 60 minutes

am 01.02.2008 21:15:47 von Mikhail Kovalev

On 1 Feb, 20:55, Jerry Stuckle wrote:
> Mikhail Kovalev wrote:
> > On 1 Feb, 20:16, Jerry Stuckle wrote:
> >> Mikhail Kovalev wrote:
> >>> On 1 Feb, 03:47, Jerry Stuckle wrote:
> >>>> Mikhail Kovalev wrote:
> >>>>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\h=
ome
> >>>>> \localhost\www\somefile.php on line 138
> >>>>> php.ini setting fixes default max execution time at 30 sec,
> >>>>> In the script itself I have set_time_limit(0);
> >>>>> I have also tried set_time_limit(90000); with no luck.
> >>>>> Checked if php was running in safe mode, and it wasn't.
> >>>>> Are there any other reasons that can cause this behavior?
> >>>>> Thanks!
> >>>>> mvh
> >>>>> MK
> >>>> Does your server have a timeout value specified?
> >>>> --
> >>>> ==================
> >>>> Remove the "x" from my email address
> >>>> Jerry Stuckle
> >>>> JDS Computer Training Corp.
> >>>> jstuck...@attglobal.net
> >>>> ==================
> >>> Timeout 300 in httpd.conf?
> >> I wouldn't think that would give a 3600 second timeout. =A0Are you runn=
ing
> >> PHP as a module or a CGI? =A0What does phpinfo() show you for your time=
out
> >> value?
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> >http://07db0bc537297586.paste.se/
>
> > Timeouts =A0 Connection: 300 - Keep-Alive: 15
> > Is this it
>
> It looks like you're running PHP as a CGI, not a module. =A0Do you have a
> timeout set for your CGI's? =A0For instance, if you're using FastCGI it is=

> an option there, IIRC.
>
> BTW - why are you running PHP as a CGI instead of a module?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

I had no idea!
I had both php4 and php5 installed, and switched from php4 to php5 by
changing the LoadModule line in httpd.conf...

What exactly could I do to make it run as a module?

Re: Script halts after 60 minutes

am 01.02.2008 23:21:30 von Mikhail Kovalev

On 1 Feb, 20:55, Jerry Stuckle wrote:
> Mikhail Kovalev wrote:
> > On 1 Feb, 20:16, Jerry Stuckle wrote:
> >> Mikhail Kovalev wrote:
> >>> On 1 Feb, 03:47, Jerry Stuckle wrote:
> >>>> Mikhail Kovalev wrote:
> >>>>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\h=
ome
> >>>>> \localhost\www\somefile.php on line 138
> >>>>> php.ini setting fixes default max execution time at 30 sec,
> >>>>> In the script itself I have set_time_limit(0);
> >>>>> I have also tried set_time_limit(90000); with no luck.
> >>>>> Checked if php was running in safe mode, and it wasn't.
> >>>>> Are there any other reasons that can cause this behavior?
> >>>>> Thanks!
> >>>>> mvh
> >>>>> MK
> >>>> Does your server have a timeout value specified?
> >>>> --
> >>>> ==================
> >>>> Remove the "x" from my email address
> >>>> Jerry Stuckle
> >>>> JDS Computer Training Corp.
> >>>> jstuck...@attglobal.net
> >>>> ==================
> >>> Timeout 300 in httpd.conf?
> >> I wouldn't think that would give a 3600 second timeout. =A0Are you runn=
ing
> >> PHP as a module or a CGI? =A0What does phpinfo() show you for your time=
out
> >> value?
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> >http://07db0bc537297586.paste.se/
>
> > Timeouts =A0 Connection: 300 - Keep-Alive: 15
> > Is this it
>
> It looks like you're running PHP as a CGI, not a module. =A0Do you have a
> timeout set for your CGI's? =A0For instance, if you're using FastCGI it is=

> an option there, IIRC.
>
> BTW - why are you running PHP as a CGI instead of a module?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

OK, figured it out. I used Denwer Apache + php4 distribution (some
years ago) which installs php as cgi
Somehow the cgi mode was preserved through upgrade... Reinstalled and
testing.

Thanks for pointing out the details!=3D)

Re: Script halts after 60 minutes

am 01.02.2008 23:35:14 von Jerry Stuckle

Mikhail Kovalev wrote:
> On 1 Feb, 20:55, Jerry Stuckle wrote:
>> Mikhail Kovalev wrote:
>>> On 1 Feb, 20:16, Jerry Stuckle wrote:
>>>> Mikhail Kovalev wrote:
>>>>> On 1 Feb, 03:47, Jerry Stuckle wrote:
>>>>>> Mikhail Kovalev wrote:
>>>>>>> Fatal error: Maximum execution time of 3600 seconds exceeded in z:\home
>>>>>>> \localhost\www\somefile.php on line 138
>>>>>>> php.ini setting fixes default max execution time at 30 sec,
>>>>>>> In the script itself I have set_time_limit(0);
>>>>>>> I have also tried set_time_limit(90000); with no luck.
>>>>>>> Checked if php was running in safe mode, and it wasn't.
>>>>>>> Are there any other reasons that can cause this behavior?
>>>>>>> Thanks!
>>>>>>> mvh
>>>>>>> MK
>>>>>> Does your server have a timeout value specified?
>>>>>> --
>>>>>> ==================
>>>>>> Remove the "x" from my email address
>>>>>> Jerry Stuckle
>>>>>> JDS Computer Training Corp.
>>>>>> jstuck...@attglobal.net
>>>>>> ==================
>>>>> Timeout 300 in httpd.conf?
>>>> I wouldn't think that would give a 3600 second timeout. Are you running
>>>> PHP as a module or a CGI? What does phpinfo() show you for your timeout
>>>> value?
>>>> --
>>>> ==================
>>>> Remove the "x" from my email address
>>>> Jerry Stuckle
>>>> JDS Computer Training Corp.
>>>> jstuck...@attglobal.net
>>>> ==================
>>> http://07db0bc537297586.paste.se/
>>> Timeouts Connection: 300 - Keep-Alive: 15
>>> Is this it
>> It looks like you're running PHP as a CGI, not a module. Do you have a
>> timeout set for your CGI's? For instance, if you're using FastCGI it is
>> an option there, IIRC.
>>
>> BTW - why are you running PHP as a CGI instead of a module?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> OK, figured it out. I used Denwer Apache + php4 distribution (some
> years ago) which installs php as cgi
> Somehow the cgi mode was preserved through upgrade... Reinstalled and
> testing.
>
> Thanks for pointing out the details!=)
>

Good - glad to see you found it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================