diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-04-29 12:18:59 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-04-29 12:18:59 -0700 |
commit | d4f70c45029ab1c6aba4bc2d69283ae43e46d9ff (patch) | |
tree | 0403f3ecd2e26d9df1ca026aeb272b3815ed8618 | |
parent | eaf72275e36560e567efc9597d929e02dc2f577d (diff) | |
download | unicorn-d4f70c45029ab1c6aba4bc2d69283ae43e46d9ff.tar.gz |
OobGC is actually broken with nginx these days since we needed to preserve the env for body.close...
-rw-r--r-- | examples/big_app_gc.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/big_app_gc.rb b/examples/big_app_gc.rb index 779c3ee..0d9aa54 100644 --- a/examples/big_app_gc.rb +++ b/examples/big_app_gc.rb @@ -21,13 +21,11 @@ # of memory, and will hurt simpler apps/endpoints that can process # multiple requests before incurring GC. -class Unicorn::HttpServer - REQ = Unicorn::HttpRequest::REQ - alias _process_client process_client - undef_method :process_client +module Unicorn::BigAppGC def process_client(client) - _process_client(client) - REQ.clear + super + @request.clear GC.start end -end if defined?(Unicorn) +end +ObjectSpace.each_object(Unicorn::HttpServer) { |s| s.extend(Unicorn::BigAppGC) } |