2010-02-04 15:08:49 -05:00
|
|
|
# This file is used by Rack-based servers to start the application.
|
|
|
|
|
2019-10-18 22:19:47 -04:00
|
|
|
if defined?(Unicorn) && ENV["RAILS_ENV"] == "production"
|
2016-11-07 06:24:34 -05:00
|
|
|
# Unicorn self-process killer
|
|
|
|
require 'unicorn/worker_killer'
|
|
|
|
|
|
|
|
# Max requests per worker
|
2016-11-07 13:49:47 -05:00
|
|
|
use Unicorn::WorkerKiller::MaxRequests, 5_000, 10_000
|
2016-11-07 06:24:34 -05:00
|
|
|
|
|
|
|
# Max memory size (RSS) per worker
|
2020-03-03 14:18:40 -05:00
|
|
|
use Unicorn::WorkerKiller::Oom, (386*(1024**2)), (768*(1024**2))
|
2016-11-07 06:24:34 -05:00
|
|
|
end
|
2014-03-28 13:59:43 -04:00
|
|
|
|
2019-10-18 22:19:47 -04:00
|
|
|
require ::File.expand_path('../config/environment', __FILE__)
|
|
|
|
|
2014-04-14 17:32:01 -04:00
|
|
|
run Rails.application
|