I am doing a PHP script that pulls a ton of data from two different database tables. While executing the script I receive a Fatal Error: Maximum execution time exceeded 30 seconds. Is there a way to fix this? Is the way I am pulling the data from the DB causing this or is it because of so many results?
Maximum Execution Time
Started by Lop, Jul 14 2006 12:15 PM
4 replies to this topic
#1
Posted 14 July 2006 - 12:15 PM
|
|
|
#2
Posted 14 July 2006 - 01:05 PM
Well I believe the execution time has to do with the webserver configuration file itself. If you have access to the configuration files you can change the max execution time.
But 30 seconds for 1 query is extremly long, are you sure you havnt created an infinate loop?
But 30 seconds for 1 query is extremly long, are you sure you havnt created an infinate loop?
#3
Guest_Jordan_*
Posted 15 July 2006 - 07:06 AM
Guest_Jordan_*
Increase this value in your php.ini
max_execution_time = 30
It wasn't in my php.ini so in that case just add it. The 30 represents the amount of seconds it will wait.
max_execution_time = 30
It wasn't in my php.ini so in that case just add it. The 30 represents the amount of seconds it will wait.
#4
Guest_Jonas_*
Posted 15 July 2006 - 04:20 PM
Guest_Jonas_*
Do you have control of your server? If not, most shared hosts put a very low limit on that number to make scripts friendlier to share.
If it is something you can't change, one workaround it is to break up whatever you are doing in segments so it does not timeout in any indivual segment.
I know a few scripts that get around this problem by doing that.
If it is something you can't change, one workaround it is to break up whatever you are doing in segments so it does not timeout in any indivual segment.
I know a few scripts that get around this problem by doing that.
#5
Posted 15 July 2006 - 05:25 PM
Jonas said:
Do you have control of your server? If not, most shared hosts put a very low limit on that number to make scripts friendlier to share.
If it is something you can't change, one workaround it is to break up whatever you are doing in segments so it does not timeout in any indivual segment.
I know a few scripts that get around this problem by doing that.
If it is something you can't change, one workaround it is to break up whatever you are doing in segments so it does not timeout in any indivual segment.
I know a few scripts that get around this problem by doing that.
Yup, that is a good idea. You can limit the amount of data that is pulled at once and have << Prev and Next >> buttons to pull the next amount of data.
for (int i;;) {
cout << "Smith";
}


Sign In
Create Account


Back to top









