diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-05-03 01:05:11 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-05-03 01:05:11 +0000 |
commit | a7f5f17ba2047ef7143465f612007ea81871a79e (patch) | |
tree | fa93430a846c83dd1c79c41f193e4dd73a08f516 /lib/rainbows/process_client.rb | |
parent | 01381ab4dfeb032c85e72724df889c7aa381aa32 (diff) | |
download | rainbows-a7f5f17ba2047ef7143465f612007ea81871a79e.tar.gz |
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.
Diffstat (limited to 'lib/rainbows/process_client.rb')
-rw-r--r-- | lib/rainbows/process_client.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb index 6201064..f30aa5d 100644 --- a/lib/rainbows/process_client.rb +++ b/lib/rainbows/process_client.rb @@ -7,10 +7,11 @@ module Rainbows::ProcessClient NULL_IO = Unicorn::HttpRequest::NULL_IO RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT IC = Unicorn::HttpRequest.input_class + HBUFSIZ = Rainbows.client_header_buffer_size def process_loop @hp = hp = Rainbows::HttpParser.new - kgio_read!(0x1000, buf = hp.buf) or return + kgio_read!(HBUFSIZ, buf = hp.buf) or return begin # loop until env = hp.parse |