about summary refs log tree commit homepage
path: root/lib/yahns/http_context.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-29 01:28:06 +0000
committerEric Wong <e@80x24.org>2013-10-29 02:37:05 +0000
commit66d4e85c5d8c5fa2874c6b5c73cf936e51e8537c (patch)
treea0a2f418f06a90fd0673294b9e5703b9a3bfe6c9 /lib/yahns/http_context.rb
parent15cd0f840ddd736cefac02814a581f8e11c1764d (diff)
downloadyahns-66d4e85c5d8c5fa2874c6b5c73cf936e51e8537c.tar.gz
8K is the default for nginx, too.  This prevents Ruby/malloc from
getting too fragmented with large buffers and being unable to release
memory back to the OS.

While we're at it, update the documentation to reflect we use this
parameter to control read(2) sizes, too.
Diffstat (limited to 'lib/yahns/http_context.rb')
-rw-r--r--lib/yahns/http_context.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_context.rb b/lib/yahns/http_context.rb
index 547d41f..651cb08 100644
--- a/lib/yahns/http_context.rb
+++ b/lib/yahns/http_context.rb
@@ -22,7 +22,7 @@ module Yahns::HttpContext # :nodoc:
     @yahns_rack = yahns_rack
     @app_defaults = yahns_rack.app_defaults
     @check_client_connection = false
-    @client_body_buffer_size = 112 * 1024
+    @client_body_buffer_size = 8 * 1024
     @client_header_buffer_size = 4000
     @client_max_body_size = 1024 * 1024 # nil => infinity
     @input_buffering = true