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 hunterp-hceJc2YFNylFcjXmduoLkw@public.gmane.org Web Programmer The Santa Fe New Mexican, Inc.
ara.t.howard-32lpuo7BZBA@public.gmane.org
2005-Dec-15 18:34 UTC
Re: A way to handle looong executions?
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 ===============================================================================