macournoyer / thin

A very fast & simple Ruby web server

This URL has Read+Write access

fermion (author)
Thu Oct 29 11:04:40 -0700 2009
macournoyer (committer)
Thu Nov 05 06:57:35 -0800 2009
commit  ad96bc341c6790e6cadef9b62589591023078434
tree    5c2feaa23b7de82b2a70398fcd72713719ddfd1f
parent  a527bb1e8ee6ce4c88b47714e585c612008242b8
thin / example / monit_sockets
100644 21 lines (18 sloc) 1.13 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
check process blog1
    with pidfile /u/apps/blog/shared/pids/thin.14000.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -u nobody -g nobody -p 14000 -a 127.0.0.1 -P tmp/pids/thin.14000.pid -c /u/apps/blog/current"
    stop program = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.14000.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
    if failed port 14000 then restart
    if cpu usage > 95% for 3 cycles then restart
    if 5 restarts within 5 cycles then timeout
group blog
 
check process blog2
    with pidfile /u/apps/blog/shared/pids/thin.14001.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -u nobody -g nobody -p 14001 -a 127.0.0.1 -P tmp/pids/thin.14001.pid -c /u/apps/blog/current"
    stop program = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.14001.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
    if failed port 14001 then restart
    if cpu usage > 95% for 3 cycles then restart
    if 5 restarts within 5 cycles then timeout
group blog