-
-
Save arunsingh/ee9b6ca6c602a2972c08399ef5d22f09 to your computer and use it in GitHub Desktop.
unicorn-worker-killer usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a config.ru, for use with every rack-compatible webserver. | |
# SSL needs to be handled outside this, though. | |
# Unicorn self-process killer | |
require 'unicorn/worker_killer' | |
# Max requests per worker | |
use Unicorn::WorkerKiller::MaxRequests, 3072, 4096 | |
# Max memory size (RSS) per worker | |
use Unicorn::WorkerKiller::Oom, (124*(1024**2)), (256*(1024**2)) | |
# if puppet is not in your RUBYLIB: | |
# $:.unshift('/opt/puppet/lib') | |
$0 = "master" | |
# if you want debugging: | |
# ARGV << "--debug" | |
ARGV << "--rack" | |
require 'puppet/application/master' | |
# we're usually running inside a Rack::Builder.new {} block, | |
# therefore we need to call run *here*. | |
run Puppet::Application[:master].run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment