From a7f5f17ba2047ef7143465f612007ea81871a79e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 May 2011 01:05:11 +0000 Subject: add client_header_buffer_size tuning parameter We're changing our default to 1K buffers to save memory. This should reduce memory usage of idle clients and lower pressure on the MRI GC. Rails applications using session cookies (the default) may want to up this to 2K or more. --- lib/rainbows.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/rainbows.rb') diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 4b8d552..0e6ca39 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -67,6 +67,7 @@ module Rainbows # :stopdoc: class << self + attr_accessor :client_header_buffer_size attr_accessor :max_bytes, :keepalive_timeout attr_accessor :server attr_accessor :cur # may not always be used @@ -81,6 +82,10 @@ module Rainbows # the default keepalive_timeout is 5 seconds @keepalive_timeout = 5 + # 1024 bytes matches nginx, though Rails session cookies will typically + # need >= 1500... + @client_header_buffer_size = 1024 + # :stopdoc: @alive = true @cur = 0 -- cgit v1.2.3-24-ge0c7