Commit 83157eba

mo khan <mo@mokhan.ca>
2013-08-10 15:11:44
update monit config to restart delayed job every 15 minutes.
1 parent 056776c
Changed files (2)
config
recipes
config/recipes/templates/monit/delayed_job.erb
@@ -1,6 +1,4 @@
 check process delayed_job with pidfile <%= delayed_job_pid %>
   start program = "/etc/init.d/delayed_job_<%= application %> start"
   stop program = "/etc/init.d/delayed_job_<%= application %> stop"
-  if mem > 200.0 MB for 1 cycle then restart
-  if cpu > 50% for 3 cycles then restart
-  if 5 restarts within 5 cycles then timeout
+  if uptime > 3 minutes then restart
config/recipes/monit.rb
@@ -28,6 +28,10 @@ namespace :monit do
       run "#{sudo} service monit #{command}"
     end
   end
+
+  task :version do
+    run "#{sudo} service monit -V"
+  end
 end
 
 def monit_config(name, destination = nil)