summaryrefslogtreecommitdiff
path: root/config.ru
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-18 13:49:09 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-18 16:52:14 +0100
commitd27224ceca2b1eb0644f593157e398193bd3e2dc (patch)
tree847bca768f6ffa6718d605d203e5b55bed78b363 /config.ru
parent4db2e97bf401dbe7a3fdd928242926c146ab935b (diff)
downloadgitlab-ce-d27224ceca2b1eb0644f593157e398193bd3e2dc.tar.gz
Add unicorn-worker-killer with memory check
Conflicts: Gemfile.lock
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.ru b/config.ru
index dfd2d862237..1edcd391e45 100644
--- a/config.ru
+++ b/config.ru
@@ -1,5 +1,11 @@
# This file is used by Rack-based servers to start the application.
+# Unicorn self-process killer
+require 'unicorn/worker_killer'
+
+# # Max memory size (RSS) per worker
+use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20))
+
require ::File.expand_path('../config/environment', __FILE__)
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do