aboutsummaryrefslogtreecommitdiffstats
path: root/config.ru
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-06-01 00:27:42 +0900
committerrhenium <re4k@re4k.info>2013-06-01 00:27:42 +0900
commit8a3690022042f013651172736ce9895dedd82556 (patch)
tree88e221e4fc383a65ece99ba87ea9bc00ccbc05ac /config.ru
parente1b34a2234a7ff30c30f643d59b73c610372a8c0 (diff)
downloadaclog-8a3690022042f013651172736ce9895dedd82556.tar.gz
add unicorn-worker-killer gem
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru11
1 files changed, 8 insertions, 3 deletions
diff --git a/config.ru b/config.ru
index 5bd6cd0..5ff2a90 100644
--- a/config.ru
+++ b/config.ru
@@ -1,8 +1,13 @@
require ::File.expand_path('../config/environment', __FILE__)
-require "unicorn_killer"
-use UnicornKiller::Oom, 144 * 1024
-use UnicornKiller::MaxRequests, 1000
+# Unicorn self-process killer
+require 'unicorn/worker_killer'
+
+# Max requests per worker
+use Unicorn::WorkerKiller::MaxRequests, 3072, 4096
+
+# Max memory size (RSS) per worker
+use Unicorn::WorkerKiller::Oom, (144*(1024**2)), (256*(1024**2))
run Aclog::Application