public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
macournoyer (author)
Tue Apr 22 05:56:13 -0700 2008
commit  fa4eb39630563d87ea9fc9eee0448e549dfaa840
tree    dfe90b9216cb0e9e038185d9fe18004b339a12da
parent  ae6f5b562bcf86248f28ad1ee6c5599436e5e3b6 parent  863978d258b5890cf4883eed8b1a81d549352276
thin / example / monit_unixsock
100644 21 lines (18 sloc) 1.172 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.1.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -S /u/apps/blog/shared/pids/thin.1.sock -P tmp/pids/thin.1.pid -c /u/apps/blog/current"
    stop program = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.1.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
    if failed unixsocket /u/apps/blog/shared/pids/thin.1.sock 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.2.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -S /u/apps/blog/shared/pids/thin.2.sock -P tmp/pids/thin.2.pid -c /u/apps/blog/current"
    stop program = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.2.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
    if failed unixsocket /u/apps/blog/shared/pids/thin.2.sock then restart
    if cpu usage > 95% for 3 cycles then restart
    if 5 restarts within 5 cycles then timeout
    group blog