Created
April 29, 2011 22:19
-
-
Save lightcap/949142 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_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