Hi I have a mongrel server running, but it stops whenever i reboot my machine Is there a way of starting the mongrel server on bootup? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I use this one in my local startup script: http://www.simplisticcomplexity.com/2006/11/29/mongrel_processes-updated-to-06/ On Wed, May 7, 2008 at 4:52 PM, Craig Willis < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi > > I have a mongrel server running, but it stops whenever i reboot my > machine > > Is there a way of starting the mongrel server on bootup? > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
mongrel_cluster comes with a init script which works well. On my Fedora/Red Hat/CentOS systems, the script is found at /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster Now if I could find out a way to also get ''script/backgroundrb start'' to automatically run as user, that would be nice. Craig On Wed, 2008-05-07 at 17:00 +0200, Franz Strebel wrote:> I use this one in my local startup script: > > http://www.simplisticcomplexity.com/2006/11/29/mongrel_processes-updated-to-06/ > > On Wed, May 7, 2008 at 4:52 PM, Craig Willis > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > Hi > > I have a mongrel server running, but it stops whenever i > reboot my > machine > > Is there a way of starting the mongrel server on bootup? > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i''ve used Monit for that. my mongrel configuration: check process mongrel_8001> with pidfile /tmp/mongrel/8001.pid > start program = "/usr/bin/mongrel_rails cluster::start -C > <RAILS_ROOT>/config/mongrel_cluster.production.yml --clean --only 8001" > stop program = "/usr/bin/mongrel_rails cluster::stop -C > <RAILS_ROOT>/config/mongrel_cluster.production.yml --clean --only 8001" > if totalmem is greater than 80.0 MB for 4 cycles then restart > if cpu is greater than 50% for 2 cycles then alert > if cpu is greater than 80% for 4 cycles then restart > if loadavg(5min) greater than 10 for 8 cycles then restart > if 20 restarts within 20 cycles then timeout > if failed port 8001 protocol http with timeout 60 seconds then restart > group <MYGROUP> >and my backgroundrb configuration: check process backgroundrb> with pidfile /tmp/backgroundrb.pid > start program = "/bin/su -c ''cd <RAILS_ROOT> && RAILS_ENV=production > script/backgroundrb start'' <MYUSER>" > stop program = "/bin/su -c ''cd <RAILS_ROOT> && RAILS_ENV=production > script/backgroundrb stop && sleep 3 && pkill -9 -f backgroundrb && rm > /tmp/backgroundrb.pid'' <MYUSER>" > > if cpu > 60% for 2 cycles then alert > if cpu > 90% for 5 cycles then restart > group <MYGROUP> >after that, run "sudo /etc/init.d/monitrc start all -g <MYGROUP>" Felipe Mesquita http://felipemesquita.com http://emailfax.com.br http://gettingdoc.com On Wed, May 7, 2008 at 3:43 PM, Craig White <craig-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote:> > mongrel_cluster comes with a init script which works well. On my > Fedora/Red Hat/CentOS systems, the script is found at > > /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster > > Now if I could find out a way to also get ''script/backgroundrb start'' to > automatically run as user, that would be nice. > > Craig > > On Wed, 2008-05-07 at 17:00 +0200, Franz Strebel wrote: > > I use this one in my local startup script: > > > > > http://www.simplisticcomplexity.com/2006/11/29/mongrel_processes-updated-to-06/ > > > > On Wed, May 7, 2008 at 4:52 PM, Craig Willis > > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > Hi > > > > I have a mongrel server running, but it stops whenever i > > reboot my > > machine > > > > Is there a way of starting the mongrel server on bootup? > > > > Thanks > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''m running Ubuntu All I wanted was a script that, when the server restarted, deleted the PID file and could be restarted automatically. I''ll take a look around at the examples you''ve given me Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---