PDA

View Full Version : Max Execution Time


scraminc
02-09-2007, 03:21 AM
I have been testing with a Prime Number Calculator that I coded, and I noticed that it only gets to about 300,000 before the max execution time stops it, with five seconds into it, getting this:
Fatal error: Maximum execution time of 5 seconds exceeded in /hosted/subs/ulmb.com/h/a/hackfest/public_html/prime_number_calculator/prime.php on line 27

The prime number calculator is at http://www.hackfest.ulmb.com/prime_number_calculator/prime.php and anyone reading this can look at the source with this - http://pastebin.ca/346153


Can you please raise the max execution time to ten seconds or so?
Thank you very much, and I understand if you can't but I don't think five more seconds will affect this server. :)

UnlimitedMB
02-09-2007, 04:07 AM
No we cannot do this.
That script uses 100% CPU while running.
Very long loops are bad for performance. avoid it.

This is the kind of thing the limit is there to protect.

scraminc
02-09-2007, 04:32 AM
Okay, thanks for responding quickly.
I understand. :)