From cbc96a6c0376686d4cc50bd88045b055f9c5a4b8 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Mon, 7 Nov 2016 10:49:47 -0800 Subject: [PATCH] re-enable preload app on unicorn --- config.ru | 2 +- config/unicorn/production.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.ru b/config.ru index 7d1a02e2f..9ff388a19 100644 --- a/config.ru +++ b/config.ru @@ -7,7 +7,7 @@ if defined?(Unicorn) && Rails.env.production? require 'unicorn/worker_killer' # Max requests per worker - use Unicorn::WorkerKiller::MaxRequests, 10_000, 15_000 + use Unicorn::WorkerKiller::MaxRequests, 5_000, 10_000 # Max memory size (RSS) per worker #use Unicorn::WorkerKiller::Oom, (192*(1024**2)), (256*(1024**2)) diff --git a/config/unicorn/production.rb b/config/unicorn/production.rb index a719d021e..2e1c47ded 100644 --- a/config/unicorn/production.rb +++ b/config/unicorn/production.rb @@ -4,7 +4,7 @@ app_path = "/var/www/danbooru2/current" # Set unicorn options worker_processes 22 -preload_app false +preload_app true timeout 180 listen "127.0.0.1:9000"