diff options
author | rhenium <re4k@re4k.info> | 2013-06-01 20:58:59 +0900 |
---|---|---|
committer | rhenium <re4k@re4k.info> | 2013-06-01 20:58:59 +0900 |
commit | 5e0d231be08d95ac30746ad419db543cb5ccfe93 (patch) | |
tree | 2d6037544fd805f1920b552a97d1b143d301912d | |
parent | b4f69a011f5cda5e9e0640a13adc6a96374e370d (diff) | |
download | aclog-5e0d231be08d95ac30746ad419db543cb5ccfe93.tar.gz |
enable unicorn-worker-killer in only production
-rw-r--r-- | config.ru | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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 |