Toby DiPasquale on 21 Jan 2008 16:27:11 -0800 |
Randy, Is this any help to you? http://www.igvita.com/2006/11/07/monit-makes-mongrel-play-nice/ On Jan 20, 2008 11:02 PM, Randy Schmidt <randy.schmidt@gmail.com> wrote: > Hi, > > Does anybody here have experience with Monit and Mongrel? The commands > I have for start program and stop program work by themselves on the > command line, however, in monit, they don't seem to work. I get: > > : monit -g wire_staging_mongrels restart mongrel_6000 > 'mongrel_6000' trying to restart > 'mongrel_6000' stop: /usr/local/bin/ruby > Sending TERM to Mongrel at PID 3930...Done. > 'mongrel_6000' start: /usr/local/bin/ruby > 'mongrel_6000' failed to start > > with this config file: > > set daemon 60 > set mailserver localhost > set mail-format { from: monit@umlatte.com } > set alert sysadmin@umlatte.com > set logfile syslog facility log_daemon > set httpd port 2812 and > use address localhost # and only accept connection from localhost > allow localhost # allow localhost to connect to the server and > allow admin:monitor # user 'admin' with password 'monit' > > check process mongrel_6000 > with pidfile /var/www/apps/wire/staging/current/log/mongrel.6000 > start program = "/usr/local/bin/ruby /usr/local/bin/mongrel_rails > start -d -e staging -a 127.0.0.1 -c /var/www/apps/wire/staging/current > -p 6000 -P /var/www/apps/wire/staging/current/log/mongrel.6000 -l > /var/www/apps/wire/staging/current/log/mongrel.6000" > stop program = "/usr/local/bin/ruby /usr/local/bin/mongrel_rails stop > -P /var/www/apps/wire/staging/current/log/mongrel.6000" > if mem is greater than 60.0 MB for 4 cycles then restart # eating up memory? > if cpu is greater than 50% for 2 cycles then alert # send an email to admin > if cpu is greater than 80% for 3 cycles then restart # hung process? > if loadavg(5min) greater than 4 for 8 cycles then restart # bad, bad, bad > GROUP wire_staging_mongrels > > Some more info: > * Yes, the environment is actually staging > * I'm using mongrel_rails by itself instead of mongrel cluster > because when doing /usr/local/bin/mongrel_rails cluster::restart, it > uses mongrel_rails and monit can't find it (there is a very limited > PATH setup > > Any help would be greatly appreciated. > > Thank you! > Randy > _______________________________________________ > To unsubscribe or change your settings, visit: > http://lists.phillyonrails.org/mailman/listinfo/talk > -- Toby DiPasquale _______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|