A way to handle looong executions?


#1

Is there somewhere I can specify a maximum execution time for a given
request. (Eg, someone does something in my application that brings about
and infinite loop). The idea of potentially huge queries or even a
programmer mistake
is not impossible, and I have a hard time accepting that I will
release an
application that has no way of handling that.


Hunter Peress
removed_email_address@domain.invalid
Web Programmer
The Santa Fe New Mexican, Inc.


#2

On Thu, 15 Dec 2005, Hunter Peress wrote:

Is there somewhere I can specify a maximum execution time for a given
request. (Eg, someone does something in my application that brings about
and infinite loop). The idea of potentially huge queries or even a programmer
mistake
is not impossible, and I have a hard time accepting that I will release an
application that has no way of handling that.

[ahoward@jib ahoward]$ ruby -e’ require “timeout” and
Timeout::timeout(2){ sleep 42 } ’
/dmsp/reference/ruby-1.8.1//lib/ruby/1.8/timeout.rb:42: execution
expired (Timeout::Error)
from -e:1:in `timeout’
from -e:1

-a

===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| – bodhicaryavatara