Welcome to WebmasterWorld Guest from 54.198.62.217

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)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


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)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


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)

Administrator

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

joined:July 31, 2003
posts:12541
votes: 1


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 16, 2001
posts:2006
votes: 0


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)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


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)

Moderator

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

joined:Apr 25, 2002
posts:8299
votes: 142


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

Tom