Welcome to WebmasterWorld Guest from 54.205.170.21

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

"Maximum execution time of 30 seconds exceeded ..."

How do I extend this / avoid this?

   
7:46 pm on Dec 6, 2004 (gmt 0)

10+ Year Member



I'm working on a script that most certainly at times can take longer then 30 seconds to run.. so I need to either alter the hard-coded value, or if theres a command I can apply IN my script (instead of changing the hard-coded value) to get arround this.. that would be great.

Thanks,
-Willis

7:54 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your server is not running in safe mode(doubtful), then you nay change the max execution setting with set_time_limit() [php.net].
1:48 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Hey thats exactly what I was looking for. Is it possible to customize the return message to suit my scripting needs?
1:55 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could define your own error handling rules [php.net].
2:25 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the script takes a long time to execute, perhaps the script can be broken down into smaller steps. Also, if the script is accessing a database you may look into optimizing the database. If it is the web host, look into using a server that is less crowded.
3:45 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Thank you for your comments sun818, but to respond, this script connects to no database. As well its run on an apache server on my computer.

The script itself is naturally time consuming (so any simplifiction would hardly scratch the surface), without going into great detail it preforms endless tests to confirm a value, and the longer the value the longer (by multiple folds) the time will require.

I'll look into that link coopster, at first glance I dont see what I'm looking for but I'll keep trying.

4:08 am on Dec 7, 2004 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You might try doing some php performace profiling [webmasterworld.com] to figure out where the bottlenecks are if it's not already clear.

Tom

 

Featured Threads

Hot Threads This Week

Hot Threads This Month