about summary refs log tree commit homepage
path: root/lib/rainbows/event_machine.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-01 00:24:46 -0700
committerEric Wong <normalperson@yhbt.net>2009-11-01 00:24:46 -0700
commita9d1fc829fc418c2e808955b9910004dff8ab769 (patch)
treedc24d936d71889753315d6939860ad8352e6bd22 /lib/rainbows/event_machine.rb
parent5af60d002c0b708b169b76973424a33e7d0928dd (diff)
downloadrainbows-a9d1fc829fc418c2e808955b9910004dff8ab769.tar.gz
Avoid slurping in case we're a fast backend writing to a slow
client.  This should prevent our memory usage from exploding
when clients are reading slowly.
Diffstat (limited to 'lib/rainbows/event_machine.rb')
-rw-r--r--lib/rainbows/event_machine.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb
index 289c92e..196fbca 100644
--- a/lib/rainbows/event_machine.rb
+++ b/lib/rainbows/event_machine.rb
@@ -114,7 +114,7 @@ module Rainbows
           if do_chunk
             EM.watch(io, ResponseChunkPipe, self).notify_readable = true
           else
-            EM.enable_proxy(EM.attach(io, ResponsePipe, self), self)
+            EM.enable_proxy(EM.attach(io, ResponsePipe, self), self, 16384)
           end
         else
           HttpResponse.write(self, response, out)