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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-18 16:49:09 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-12-18 19:52:14 +0400
commitd27224ceca2b1eb0644f593157e398193bd3e2dc (patch)
tree847bca768f6ffa6718d605d203e5b55bed78b363 /config.ru
parent4db2e97bf401dbe7a3fdd928242926c146ab935b (diff)
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