blob: 99723cf22b7df325680ac7439dd2d8896e5a6498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
# This file is used by Rack-based servers to start the application.
require_relative "config/environment"
# Kill unicorn workers really aggressively (at 300mb)
if defined?(Unicorn)
require "unicorn/worker_killer"
oom_min = (280) * (1024**2)
oom_max = (300) * (1024**2)
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, oom_min, oom_max
end
use Rack::Deflater
run Rails.application
Rails.application.load_server
|