Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matt <lukas@zauberstuhl.de>2016-04-13 11:51:05 +0300
committerLukas Matt <lukas@zauberstuhl.de>2016-04-13 15:41:02 +0300
commit56c7af940dbf76aee98375b2128e0cb5712312ed (patch)
tree6264e9e77409b3d4f393b51d0a71ec895e7977a5 /config.ru
parentf073a96b19e509252ff753da9ba757a17e574969 (diff)
Move unicorn_killer to Gemfile
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru7
1 files changed, 5 insertions, 2 deletions
diff --git a/config.ru b/config.ru
index e25248600..2f5ac99d8 100644
--- a/config.ru
+++ b/config.ru
@@ -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