Skip to content

Instantly share code, notes, and snippets.

@stopdropandrew
Created June 1, 2010 23:14
Show Gist options
  • Save stopdropandrew/421670 to your computer and use it in GitHub Desktop.
Save stopdropandrew/421670 to your computer and use it in GitHub Desktop.
check process unicorn
with pidfile /var/run/unicorn/unicorn.pid
start program = "/etc/init.d/unicorn start"
stop program = "/etc/init.d/unicorn stop"
if mem is greater than 300.0 MB for 1 cycles then restart # eating up memory?
if cpu is greater than 50% for 2 cycles then alert # send an email to admin
if cpu is greater than 80% for 3 cycles then restart # hung process?
group unicorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment