Randy Schmidt on 20 Jan 2008 20:10:42 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] Re: Monit + Mongrel

  • From: "Randy Schmidt" <randy.schmidt@gmail.com>
  • To: "Philly on Rails ML" <talk@phillyonrails.org>
  • Subject: [PhillyOnRails] Re: Monit + Mongrel
  • Date: Sun, 20 Jan 2008 23:10:05 -0500
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=MJi1bHTr2t9fkm270KrOgGJRp7BgVvEuaV8ybchtDDc=; b=EE0LI9PKJut5NaKvHYGlUypBTtoObesvxHPYvFKsWjrzBU0zwD7YO6jJXOTzg3XZCPr+hvSJY7sJDSw4OyIo9dKkuRQr8FwMv1T2w47OgCbVGy2bK1pf9GbOKWoXeq22DeFjQSsh8mDnim1U+Dq3qOZaOTSDplahMF9bFo6gWQc=
  • List-archive: <http://lists.phillyonrails.org/pipermail/talk>
  • Reply-to: talk@phillyonrails.org
  • Sender: talk-bounces@phillyonrails.org

Some more info just in case:

  * I'm not really looking for an answer like "use god"
  * There are a number of posts that I found where people had the same
problem, but nobody was kind enough to post back their solution (just
a "we figured it out, thanks")
  * Someone mentioned that since it takes a while to start up mongrel,
that it may be timing out. I played with a number of timout lengths
and couldn't get it to work. I'm open to ideas though.

Thanks again!
Randy

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