only use puma, introduce rack-timeout (#9718)

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
This commit is contained in:
Markus Kahl
2021-10-04 14:42:37 +01:00
committed by GitHub
parent 58e5a01309
commit c9256e644c
15 changed files with 192 additions and 129 deletions
-17
View File
@@ -32,23 +32,6 @@
require ::File.expand_path('config/environment', __dir__)
##
# Use the worker killer when Unicorn is being used
if defined?(Unicorn) && Rails.env.production?
require 'unicorn/worker_killer'
min_ram = ENV.fetch('OPENPROJECT_UNICORN_RAM2KILL_MIN', 340 * 1 << 20).to_i
max_ram = ENV.fetch('OPENPROJECT_UNICORN_RAM2KILL_MAX', 400 * 1 << 20).to_i
min_req = ENV.fetch('OPENPROJECT_UNICORN_REQ2KILL_MIN', 3072).to_i
max_req = ENV.fetch('OPENPROJECT_UNICORN_REQ2KILL_MAX', 4096).to_i
# Kill Workers randomly between 340 and 400 MB (per default)
# or between 3072 and 4096 requests.
# Our largest installations are starting around 200/230 MB
use Unicorn::WorkerKiller::Oom, min_ram, max_ram
use Unicorn::WorkerKiller::MaxRequests, min_req, max_req
end
subdir = OpenProject::Configuration.rails_relative_url_root.presence
map (subdir || '/') do