diff options
author | Lukas Matt <lukas@zauberstuhl.de> | 2016-04-13 11:51:05 +0300 |
---|---|---|
committer | Lukas Matt <lukas@zauberstuhl.de> | 2016-04-13 15:41:02 +0300 |
commit | 56c7af940dbf76aee98375b2128e0cb5712312ed (patch) | |
tree | 6264e9e77409b3d4f393b51d0a71ec895e7977a5 /config.ru | |
parent | f073a96b19e509252ff753da9ba757a17e574969 (diff) |
Move unicorn_killer to Gemfile
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5,12 +5,15 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path("../config/environment", __FILE__) -require ::File.expand_path("../lib/unicorn_killer", __FILE__) require ::File.expand_path("../lib/rack/internet_explorer_version", __FILE__) # Kill unicorn workers really aggressively (at 300mb) if defined?(Unicorn) - use UnicornKiller::Oom, 300 * 1024 + require "unicorn/worker_killer" + oom_min = (280) * (1024**2) + oom_max = (300) * (1024**2) + # Max memory size (RSS) per worker + use Unicorn::WorkerKiller::Oom, oom_min, oom_max end use Rack::Deflater use Rack::InternetExplorerVersion, minimum: 9 |