mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:30:16 +08:00
tune down min requests, tune up largest multiplier, tune up history
This commit is contained in:
parent
466459db51
commit
a92ada0493
|
@ -5,8 +5,8 @@
|
|||
# hook unicorn
|
||||
module Middleware::UnicornOobgc
|
||||
|
||||
MIN_REQUESTS_PER_OOBGC = 6
|
||||
MAX_DELTAS = 20
|
||||
MIN_REQUESTS_PER_OOBGC = 5
|
||||
MAX_DELTAS = 25
|
||||
|
||||
def self.init
|
||||
# hook up HttpServer intercept
|
||||
|
@ -45,7 +45,7 @@ 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
|
||||
if (largest * 3) + new_live_num > @gc_live_num
|
||||
puts "OobGC invoked"
|
||||
GC.start
|
||||
@num_requests = 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user