aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-06-01 20:58:59 +0900
committerrhenium <re4k@re4k.info>2013-06-01 20:58:59 +0900
commit5e0d231be08d95ac30746ad419db543cb5ccfe93 (patch)
tree2d6037544fd805f1920b552a97d1b143d301912d
parentb4f69a011f5cda5e9e0640a13adc6a96374e370d (diff)
downloadaclog-5e0d231be08d95ac30746ad419db543cb5ccfe93.tar.gz
enable unicorn-worker-killer in only production
-rw-r--r--config.ru18
1 files changed, 10 insertions, 8 deletions
diff --git a/config.ru b/config.ru
index 5ff2a90..ec5b397 100644
--- a/config.ru
+++ b/config.ru
@@ -1,13 +1,15 @@
require ::File.expand_path('../config/environment', __FILE__)
-# 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))
+if Rails.env.production?
+ # 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))
+end
run Aclog::Application