From 38672501206c9e64d241e3d8571f70b198f0c1e5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Jun 2011 20:51:16 +0000 Subject: configurator: truncate timeouts to 32-bit LONG_MAX IO.select in Ruby can't wait longer than this. This means Unicorn can't support applications that take longer than 68 years to respond :( --- lib/unicorn/configurator.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index bdb77ec..2c5fe86 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -186,6 +186,8 @@ class Unicorn::Configurator # } def timeout(seconds) set_int(:timeout, seconds, 3) + max = 0x7fffffff + set[:timeout] = seconds > max ? max : seconds end # sets the current number of worker_processes to +nr+. Each worker -- cgit v1.2.3-24-ge0c7