From 772c7a486583630627f5de58aef82423487592e4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Jul 2010 09:29:18 +0000 Subject: bump TCP_DEFER_ACCEPT default value Unicorn 1.1.0 lets us change this default, and we need it higher to avoid wasting workers against stupidly (or maliciously) slow clients. --- lib/rainbows.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 3ea98ed..7bc9a92 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -1,5 +1,8 @@ # -*- encoding: binary -*- require 'unicorn' +# the value passed to TCP_DEFER_ACCEPT actually matters in Linux 2.6.32+ +Unicorn::SocketHelper::DEFAULTS[:tcp_defer_accept] = 60 + require 'rainbows/error' require 'rainbows/configurator' require 'fcntl' -- cgit v1.2.3-24-ge0c7