...

View Full Version : Script ending prematurely



NancyJ
08-30-2006, 05:08 PM
Since yesterday, a script that I have just stops, well it stops outputting to the browser and continues to run for some time and then stops for no reason. I havent changed anything - except some mysql settings - I just cant see any reason for it to do this.
The basic flow goes

call the preprocess function
call the process data function
call the postprocess function

What happens is part way through the process data function, output is no longer sent. The function completes but nothing else happens after that.

chump2877
08-30-2006, 05:25 PM
Seeing your code would help...:p

NancyJ
08-30-2006, 05:55 PM
the code hasnt changed at all but if it makes you feel better.



lockTable($clientID);
prepareData($activeTable, $altTable, $clientID);
processData($clientID);
removeDuplicates($activeTable, $altTable);
unlockTable();
setDepartures();

FWIW, its just run fine as a cron job for another client (with 100k rows, the ones that were failing were 260-450k rows), it seems to be intermittent or possibly related to the amount of data being processed.

Fumigator
08-30-2006, 06:31 PM
Is your script running into the max_execution_time limit? You should get a warning if that's the case but maybe warnings are being suppressed?

NancyJ
08-30-2006, 07:10 PM
warnings arent suppressed on this part of the site - otherwise, yeah it could be max execution time, but shouldnt be since mysql time isnt included in that. But it cant be - cos as you said - it woul give an error

Spookster
08-30-2006, 08:21 PM
You said you changed some mysql settings. What did you change? Have you tried changing things back to see if it works again?

NancyJ
08-30-2006, 10:46 PM
Just the read and sort buffer sizes

Spookster
08-31-2006, 09:19 AM
When you change those settings back to what they were does it work again?

NancyJ
08-31-2006, 12:40 PM
It seems to be working again today /shrug - didnt change anything

kaydara
08-31-2006, 01:13 PM
your script ha some IA ? eheheh little joking
you can only understend the problem with some dedugging.
if these script are run from a cron, create you dedugging to output to a log file and see whats really happening.
think i cant help other way.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum