Commit 59c5a42e96b0acf64a32276798dedb1fa75d06e6
Exists in
spb-stable
and in
3 other branches
Merge pull request #5888 from jameswritescode/passenger_fix
Don't use unicorn worker killer if using Phusion Passenger
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
config.ru
1 | # This file is used by Rack-based servers to start the application. | 1 | # This file is used by Rack-based servers to start the application. |
2 | 2 | ||
3 | -# Unicorn self-process killer | ||
4 | -require 'unicorn/worker_killer' | 3 | +unless defined?(PhusionPassenger) |
4 | + # Unicorn self-process killer | ||
5 | + require 'unicorn/worker_killer' | ||
5 | 6 | ||
6 | -# # Max memory size (RSS) per worker | ||
7 | -use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20)) | 7 | + # Max memory size (RSS) per worker |
8 | + use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20)) | ||
9 | +end | ||
8 | 10 | ||
9 | require ::File.expand_path('../config/environment', __FILE__) | 11 | require ::File.expand_path('../config/environment', __FILE__) |
10 | 12 |