Skip to content

Instantly share code, notes, and snippets.

@lightcap
Created April 29, 2011 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightcap/949142 to your computer and use it in GitHub Desktop.
Save lightcap/949142 to your computer and use it in GitHub Desktop.
check process unicorn_commercial_api_master
with pidfile /var/run/engineyard/unicorn_commercial_api.pid
start program = "/bin/su - pvpower -c '/data/commercial_api/shared/bin/app_commercial_api start'" with timeout 65 seconds
stop program = "/bin/su - pvpower -c '/data/commercial_api/shared/bin/app_commercial_api stop'" with timeout 65 seconds
group commercial_api
check process unicorn_commercial_api_worker_0
with pidfile /var/run/engineyard/unicorn_worker_commercial_api_0.pid
if totalmem is greater than 120 MB for 2 cycles then exec "/data/commercial_api/shared/bin/app_commercial_api kill_worker 0"
check process unicorn_commercial_api_worker_1
with pidfile /var/run/engineyard/unicorn_worker_commercial_api_1.pid
if totalmem is greater than 120 MB for 2 cycles then exec "/data/commercial_api/shared/bin/app_commercial_api kill_worker 1"
check process unicorn_commercial_api_worker_2
with pidfile /var/run/engineyard/unicorn_worker_commercial_api_2.pid
if totalmem is greater than 120 MB for 2 cycles then exec "/data/commercial_api/shared/bin/app_commercial_api kill_worker 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment