|
From: | sven falempin |
Subject: | Re: task prioritization |
Date: | Tue, 16 Jul 2013 09:37:47 -0400 |
Further, depencies are producing some backwards behavior.In the following example starting redis server is triggering the start of my resque worker, even though the dependency tree is the reverse.IMO, starting redis-server should trigger nothing after it starts since it's resque_worker_1 that depends on redis-server.Here's my conf, followed by a status and tailing monit.log.Starting with all servies turned off.# cat /etc/monit/monit.confset httpd port 2812 and use the address localhostallow 127.0.0.1check process redis-serverwith pidfile /var/run/redis.pidstart program = "/etc/init.d/redis-server start" with timeout 30 secondsstop program = "/etc/init.d/redis-server stop"check process resque_worker_1with pidfile /u/apps/stocks/shared/pids/resque_worker_1.pidstart program = "/bin/sh -c 'cd /u/apps/stocks/current ; bundle exec rake environment resque:work RAILS_ENV=production QUEUE=daily_memoizer,high,medium VERBOSE=1 PIDFILE=/u/apps/stocks/shared/pids/resque_worker_1.pid >> log/resque_worker_1.log 2>&1 &'" as uid blue and gid blue with timeout 45 secondsstop program = "/bin/sh -c 'cd /u/apps/stocks/shared/pids/ ; sudo kill -QUIT $(cat resque_worker_1.pid) || true'" as uid jsharpe as gid jsharpe with timeout 120 secondsif totalmem is greater than 200 MB for 5 cycles then restartdepends on redis-servergroup resque# monit statusThe Monit daemon 5.3.2 uptime: 8mProcess 'resque_worker_1'status Not monitoredmonitoring status Not monitoreddata collected Mon, 15 Jul 2013 22:43:20Process 'redis-server'status Not monitoredmonitoring status Not monitoreddata collected Mon, 15 Jul 2013 22:43:20System 'system_stocks-app'status Not monitoredmonitoring status Not monitoreddata collected Mon, 15 Jul 2013 22:43:20# monit start redis-server/var/log/monit.log[EDT Jul 15 22:45:26] info : 'redis-server' start on user request[EDT Jul 15 22:45:26] info : monit daemon at 2898 awakened[EDT Jul 15 22:45:26] info : Awakened by User defined signal 1[EDT Jul 15 22:45:26] info : 'redis-server' start: /etc/init.d/redis-server[EDT Jul 15 22:45:26] error : monit: Error reading pid from file '/var/run/redis.pid'[EDT Jul 15 22:45:26] info : 'resque_worker_1' start: /bin/sh[EDT Jul 15 22:45:46] info : 'redis-server' start action done# monit status | egrep 'System|Process|status'Process 'resque_worker_1'status Runningmonitoring status MonitoredProcess 'redis-server'status Runningmonitoring status MonitoredSystem 'system_stocks-app'status Not monitoredmonitoring status Not monitored
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |