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"