Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bluepill.application("app", :base_dir => "#{RAILS_ROOT}/tmp/bluepill", :log_file => "#{RAILS_ROOT}/log/bluepill.log") do |app|
app.process("unicorn") do |process|
process.pid_file = File.join(RAILS_ROOT, 'tmp/pids/')
process.working_dir = RAILS_ROOT
process.start_command = "unicorn -c config/unicorn.rb -E production"
process.stop_command = "kill -QUIT {{PID}}"
process.restart_command = "kill -USR2 {{PID}}"
process.uid = process.gid = 'www'
process.start_grace_time = 20.seconds
process.stop_grace_time = 20.seconds
process.restart_grace_time = 25.seconds
process.daemonize = true
process.monitor_children do |child_process|
child_process.stop_command = "kill -QUIT {{PID}}"
child_process.checks :mem_usage, :every => 10.seconds, :below => 150.megabytes, :times => [3,4], :fires => :stop
child_process.checks :cpu_usage, :every => 10.seconds, :below => 20, :times => [3,4], :fires => :stop

This comment has been minimized.

Copy link

akzhan commented Jun 24, 2010

Я до 30 числа в небольшом отпуске, 1 или 2 июля настрою по вашим конфигам приложение на работе, и поправлю.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.