add Unicorn::OobGC middleware
commit95b75a5043b34f39ece4f52befb4b3f884dfdd20
authorEric Wong <normalperson@yhbt.net>
Fri, 14 May 2010 18:27:35 +0000 (14 18:27 +0000)
committerEric Wong <normalperson@yhbt.net>
Fri, 14 May 2010 18:40:17 +0000 (14 18:40 +0000)
tree502016acafb35277ca8305b9e0255cad6ba7d9f6
parentbbefb358174e73d7edbf8a1014817fe1557e39af
add Unicorn::OobGC middleware

This middleware allows configurable out-of-band garbage
collection outside of the normal request/response cycle.

It offers configurable paths (to only GC on expensive actions)
and intervals to limit GC frequency.

It is only expected to work well with Unicorn, as it would
hurt performance on single-threaded servers if they
have keepalive enabled.  Obviously this does not work well
for multi-threaded or evented servers that serve multiple
clients at once.
lib/unicorn/oob_gc.rb [new file with mode: 0644]