From 466459db51a718da0cf09c45463f36594e395478 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 15 Nov 2013 17:08:38 +1100 Subject: [PATCH] more diags for a bit --- lib/middleware/unicorn_oobgc.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleware/unicorn_oobgc.rb b/lib/middleware/unicorn_oobgc.rb index 87ede1f97..cfeea7df0 100644 --- a/lib/middleware/unicorn_oobgc.rb +++ b/lib/middleware/unicorn_oobgc.rb @@ -46,12 +46,13 @@ module Middleware::UnicornOobgc if @gc_live_num && @num_requests > MIN_REQUESTS_PER_OOBGC largest = @previous_deltas.max if largest * (2 + Random.rand(2)) + new_live_num > @gc_live_num + puts "OobGC invoked" GC.start @num_requests = 0 end end else - puts "OobGC, GC live num adjusted, GC was not avoided: #{live_num} reqs since GC: #{@num_requests} largest: #{@previous_deltas.max}" + puts "OobGC: GC live num adjusted: old live_num #{@gc_live_num} new: #{live_num} - reqs since GC: #{@num_requests} largest delta: #{@previous_deltas.max}" @num_requests = 0 @gc_live_num = live_num