Created
November 14, 2011 14:10
-
-
Save joker1007/1364017 to your computer and use it in GitHub Desktop.
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
check process unicorn with pidfile "/var/www/rails_apps/pasokara_player/shared/pids/unicorn.pid" | |
start program = "/bin/su - joker bash -c '. /home/joker/.rvm/scripts/rvm; cd /var/www/rails_apps/pasokara_player/current; bundle exec unicorn_rails -D -E production -p 8000'" | |
with timeout 20 seconds | |
stop program = "/bin/su - joker bash -c '/bin/kill -QUIT `/bin/cat /var/www/rails_apps/pasokara_player/shared/pids/unicorn.pid`'" | |
if totalmem > 500 MB for 2 cycles | |
then exec "/bin/kill -HUP `/bin/cat /var/www/rails_apps/pasokara_player/shared/pids/unicorn.pid`" | |
if 2 restarts within 3 cycles then timeout | |
if cpu usage > 95% for 3 cycles then restart | |
# vim:ft=monitrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment