From 4beeb52b1c52ea4486dea13cebe2a8438a9f2139 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Jun 2011 01:10:07 +0000 Subject: memory reductions in worker process There's absolutely no need to keep the OptionParser around in worker processes. --- lib/unicorn/http_server.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/unicorn') diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 3933da1..059f040 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -458,7 +458,9 @@ class Unicorn::HttpServer def after_fork_internal @ready_pipe.close if @ready_pipe - @ready_pipe = nil + Unicorn::Configurator::RACKUP.clear + @ready_pipe = @init_listeners = @config = @before_exec = @before_fork = nil + srand # http://redmine.ruby-lang.org/issues/4338 # The OpenSSL PRNG is seeded with only the pid, and apps with frequently -- cgit v1.2.3-24-ge0c7