diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-10 19:02:05 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-22 01:54:21 -0700 |
commit | 1e2bbe9f29f2297dacd1f87adedec1033f513aa7 (patch) | |
tree | 6731f8205afa5ae65ee7ef4fd06cfb2e78b75ebc /lib/unicorn/configurator.rb | |
parent | 341b6680e021586b1245ec3fb7e6ebf9b75a32f3 (diff) | |
download | unicorn-1e2bbe9f29f2297dacd1f87adedec1033f513aa7.tar.gz |
2 seconds is still prone to race conditions under high load. We're intentionally less accurate than we could be in order to reduce syscall and method dispatch overhead.
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 64647a3..a432f64 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -145,11 +145,11 @@ module Unicorn # timeout is enforced by the master process itself and not subject # to the scheduling limitations by the worker process. Due the # low-complexity, low-overhead implementation, timeouts of less - # than 2.0 seconds can be considered inaccurate and unsafe. + # than 3.0 seconds can be considered inaccurate and unsafe. def timeout(seconds) Numeric === seconds or raise ArgumentError, "not numeric: timeout=#{seconds.inspect}" - seconds >= 2 or raise ArgumentError, + seconds >= 3 or raise ArgumentError, "too low: timeout=#{seconds.inspect}" @set[:timeout] = seconds end |