Created
November 10, 2011 22:26
-
-
Save dstrelau/1356462 to your computer and use it in GitHub Desktop.
watching unicorns with upstart
This file contains hidden or 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
# turn off marking upstreams as failed via max_fails and fail_timeout | |
# if you're only using 1 unicorn, you have to list it twice so nginx tries it again | |
upstream app { | |
server 127.0.0.1:8080 max_fails=0 fail_timeout=0; | |
server 127.0.0.1:8080 max_fails=0 fail_timeout=0; | |
} | |
# tells nginx to retry another upstream on failure | |
proxy_next_upstream error; | |
proxy_pass http://app; |
This file contains hidden or 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
# LIMIT AS = VIRT in top | |
# For some reason, LIMIT RSS doesn't work correctly | |
limit as 157286400 157286400 # 150*1024*1024 | |
exec /usr/local/bin/unicorn -c /home/ubuntu/unicorn.rb /home/ubuntu/config.ru |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment