Hello everyone.
I've got a rails application that is using 3 mongrels that sit behind
nginx. I'm monitoring the mongrels, nginx and mysql with Munin and I'm
restarting the processes when they hit certain levels with God.
Can someone shed some light on this for me.
I'm starting the mongrels off with this command, looping through 3
ports.
mongrel_rails start -d -e production -a 127.0.0.1 -c
/var/www/rails/daughter/current -p #{port} -P
/var/www/conf/log/mongrel.#{port}.pid -l
/var/www/conf/log/mongrel.#{port}.log.
If my mongrels start chewing up too much memory I restart them like so
mongrel_rails restart -P /var/www/conf/log/mongrel.#{port}.pid
All works well. The problem is that munin does not record the mongrel
after it's been restarting as the restarted mongrel runs underneath a
ruby process as opposed to a mongrel_rail process.
Here's what ps aux | grep mongrel_rails outputs after one mongrel has
restarted.
/USR/BIN/RUBY1.8 /USR/BIN/MONGREL_RAILS START -D -E PRODUCTION -A
127.0.0.1 -C /VAR/WWW/RAILS/DAUGHTER/CURRENT -P 5001 -P
/VAR/WWW/CONF/LOG/MONGREL.5001.PID -L /VAR/WWW/CONF/LOG/MONGREL.5001.LOG
RUBY /USR/LIB/RUBY/GEMS/1.8/GEMS/MONGREL-1.1.5/BIN/MONGREL_RAILS START
-D -E PRODUCTION -A 127.0.0.1 -C /VAR/WWW/RAILS/DAUGHTER/CURRENT -P 5000
-P /VAR/WWW/CONF/LOG/MONGREL.5000.PID -L
/VAR/WWW/CONF/LOG/MONGREL.5000.LOG
I've capitalised them all so don't worry about the switches, any ideas
why mongrel_rails start does this
/USR/BIN/RUBY1.8 /USR/BIN/MONGREL_RAILS START
but mongrel_rails restart does this
RUBY /USR/LIB/RUBY/GEMS/1.8/GEMS/MONGREL-1.1.5/BIN/MONGREL_RAILS START
Any help would be greatly appreciated.
on 2008-12-02 16:15
on 2008-12-02 20:18
On Tue, Dec 2, 2008 at 7:15 AM, Matt Davies <lists@ruby-forum.com> wrote: > > after it's been restarting as the restarted mongrel runs underneath a > -D -E PRODUCTION -A 127.0.0.1 -C /VAR/WWW/RAILS/DAUGHTER/CURRENT -P 5000 > I have you tried mongrel_cluster_restart ? You can define a config file which says how many servers to startup, and what port # to start at (ie: 9000). You can also do a --clean to remove old pid files. -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.