about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-08 09:29:18 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-08 09:30:52 +0000
commit772c7a486583630627f5de58aef82423487592e4 (patch)
treeeb6e032c50751349f5870d07fc0efd1d799084ff
parentb07c3e00b390eebde32c762fd17ab387490c7552 (diff)
downloadrainbows-772c7a486583630627f5de58aef82423487592e4.tar.gz
Unicorn 1.1.0 lets us change this default, and we need it higher
to avoid wasting workers against stupidly (or maliciously) slow
clients.
-rw-r--r--lib/rainbows.rb3
1 files changed, 3 insertions, 0 deletions
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'