You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#NOTE: Set these variables in heroku:
# heroku config:set MAX_REQUEST_MIN=3072 MAX_REQUEST_MAX=4096 OOM_MIN=192 OOM_MAX=256
if ENV['RAILS_ENV'] == 'production' && defined?(Unicorn)
require 'unicorn'
require 'unicorn/worker_killer'
max_request_min = ENV['MAX_REQUEST_MIN'].to_i || 3072
max_request_max = ENV['MAX_REQUEST_MAX'].to_i || 4096
# Max requests per worker
use Unicorn::WorkerKiller::MaxRequests, max_request_min, max_request_max
oom_min = ((ENV['OOM_MIN'].to_i || 192) * (1024**2))
oom_max = ((ENV['OOM_MAX'].to_i || 256) * (1024**2))
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, oom_min, oom_max
end
# This file is used by Rack-based servers to start the application.
require 'sidekiq/web'
require ::File.expand_path('../config/environment', __FILE__)
run BangWithFriends::Application
The text was updated successfully, but these errors were encountered:
I'm running ruby 2.1.2 and rails 3.2.22. I'm getting this error in my logs right after I tried to add unicorn-worker-killer:
Here's my config.ru file:
The text was updated successfully, but these errors were encountered: