Skip to content

Commit 5206db2

Browse files
committed
Example Resque monit config.
1 parent 7158bd8 commit 5206db2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/monit/resque.monit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
check process resque_worker_QUEUE
2+
with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid
3+
start program = "/bin/sh -c 'cd /data/APP_NAME/current; RAILS_ENV=production QUEUE=queue_name VERBOSE=1 nohup rake resque:work &> log/resque_worker_QUEUE.log & echo $! > tmp/pids/resque_worker_QUEUE.pid'" as uid deploy and gid deploy
4+
stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -s QUIT `cat tmp/pids/resque_worker_QUEUE.pid` && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'"
5+
if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory?
6+
group resque_workers

0 commit comments

Comments
 (0)