Forum Moderators: coopster

Message Too Old, No Replies

Script Crashing/Timing Out

What settings can I change to let it run longer?

         

dougmcc1

4:10 pm on Apr 7, 2006 (gmt 0)

10+ Year Member



I have a script that uses a couple of while loops to pull and input data into the mySQL database. There is a lot of data so the script crashes after a few minutes, saying "page cannot be found".

The max execution time in php.ini is 3600 seconds but the script is crashing before that.

I tried adding ignore_user_abort(true) at the beginning but that didnt help.

I also put set_time_limit(1000) in all the while loops but obviously since the script wasn't running for the 3600 seconds in the first place adding this didn't make any difference either.

Any other things you can think of? Any settings in Apache or mySQL I could try changing? I'm using XAMPP and am on an intranet.

coopster

9:10 pm on Apr 7, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I'm wondering if you aren't hitting a memory [php.net] issue?

FalseDawn

12:40 am on Apr 8, 2006 (gmt 0)

10+ Year Member



You only need call set_time_limit once - at the beginning of the script.
set_time_limit(0) should be used.

Also, set_time_limit does not work if PHP is in safe mode:
[us3.php.net...]