By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Interesting Timeout Problem - Please Help

P: 3
My program goes thru about 15.000 lines of MySQL data and each line has about 15 variable (survey results).

Let's say I am calculating the scores and using 25 formulas for each line...

the PHP file starts executing and goes up to about 7000-7500 and then stops executing with no reason. It is not a 3 minute or 5 minute timeout issue. This happens in 15-20 seconds.

Is there a MAXIMUM number of formula executions kind of timeout in PHP? Please help, thanks...
May 23 '07 #1
Share this Question
Share on Google+
8 Replies


pbmods
Expert 5K+
P: 5,821
Heya, jaymz79. Welcome to TSDN!

the PHP file starts executing and goes up to about 7000-7500 and then stops executing with no reason. It is not a 3 minute or 5 minute timeout issue. This happens in 15-20 seconds.
Are you getting an error message? Is there any output at all? Should there be any output?

How are you gauging how far your script gets before it stops (the 7000-7500 figure)?

Does your script get to the exact same point every time before hanging, or is it fairly random?

I take it, then, that your script is executing per-row on your MySQL results, and you're not using a stored procedure?

If you're using a stored procedure, is it getting flagged as a 'slow query' by MySQL?

Speaking of which, is it possible that your script is hitting an infinite loop somewhere? Perhaps there's a single row in there that has exactly the right data to make your script crash.
May 24 '07 #2

P: 3
Hello,

It is completely random. This is the thing that pisses me off. Sometimes it goes up to 8 thousand something, sometimes it just stops at 7 thousand something... I inserted an echo line during process showing what line it is working on to see when it quits but the thing is completely random.

There is no infinite loop because I am not doing anything that would loop back to beginning... If it is less than 5000, it works fine.

This problem really pissed me off. Any help would be really appreciated. Thanks...


Heya, jaymz79. Welcome to TSDN!



Are you getting an error message? Is there any output at all? Should there be any output?

How are you gauging how far your script gets before it stops (the 7000-7500 figure)?

Does your script get to the exact same point every time before hanging, or is it fairly random?

I take it, then, that your script is executing per-row on your MySQL results, and you're not using a stored procedure?

If you're using a stored procedure, is it getting flagged as a 'slow query' by MySQL?

Speaking of which, is it possible that your script is hitting an infinite loop somewhere? Perhaps there's a single row in there that has exactly the right data to make your script crash.
May 24 '07 #3

Motoma
Expert 2.5K+
P: 3,235
Take a look at this post and see if you get any error messages then. I suspect you have a malformed query which is failing.
May 24 '07 #4

pbmods
Expert 5K+
P: 5,821
So you're executing a single query per row on 15000 rows. Is this correct?
May 25 '07 #5

P: 3
Hello guys,

I tried the show errors option, but it really doesn't show me any error about that weird thing. The thing I don't understand is, it is completelty random, sometimes it quits at 7523 sometimes at 8190... This is driving me crazy, I am modifying the code to refresh the page within selected periods, if I do that it works. for instance if I run the same file for rows 0-2000 and then refresh the file and run 2000-4000 etc. it works. I am just guessing that PHP, or the server I am using is not able to hold thousands of variables in its cache at the same time... This is the only thing I can think of. This sucks big time.

I would be glad to hear about your ideas, thanks for your help...
May 25 '07 #6

Motoma
Expert 2.5K+
P: 3,235
Hello guys,

I tried the show errors option, but it really doesn't show me any error about that weird thing. The thing I don't understand is, it is completelty random, sometimes it quits at 7523 sometimes at 8190... This is driving me crazy, I am modifying the code to refresh the page within selected periods, if I do that it works. for instance if I run the same file for rows 0-2000 and then refresh the file and run 2000-4000 etc. it works. I am just guessing that PHP, or the server I am using is not able to hold thousands of variables in its cache at the same time... This is the only thing I can think of. This sucks big time.

I would be glad to hear about your ideas, thanks for your help...
Perhaps, then, you should post some code for us to look at. Are you doing anything dumb like putting @s in front of queries so they won't return errors?
May 25 '07 #7

P: 1
hi i have a similiar problem

Hi,

Apache stops printing php statements after looping through the multi-dimensional array, and does not reach a point where I print "hello there !" message.
i need to output beyound the print statements in array, to execute javascript in client browser. Please help !

try catch messages are not showing any error !
Note : 1. all my pages work perfectly even with huge outputs, only this multi-dimensional array output is the problem
2. always it stops when the multi-dimensional array to be printed is of certain size = 20



Thanks
Irfan Ahmed

*********
here is the code below
<?php

try{
while( $localcount < $localcountfinal ) {
if(($completeTreeLocal[$localcount]["node"]+0) != 50000 ){
print $completeTreeLocal[$localcount]["routePath"];
}

$localcount++;
}
$_SESSION['completeTreeStruct'] = serialize( $completeTreeLocal);
} catch (Exception $e) {
echo ' Caught exception: ', $e->getMessage(), "\n";
}

print "hello there !";

?>
May 29 '07 #8

Motoma
Expert 2.5K+
P: 3,235
Have you tried enabling the error messages as described at the top of this forum?
May 29 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.