Hello list, I''ve got a server with several Rails application running under mongrel. It works fine, but the problem is when I reboot it. Having to go to each app''s dir and restart mongrel is a pain, so I would like to know if there''s already something (maybe a rake task or bash script) that solves this problem? If not, what would be the recommended way? A bash script? Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Oct 30, 2007 7:55 PM, Marcelo de Moraes Serpa <celoserpa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello list, > > I''ve got a server with several Rails application running under mongrel. It > works fine, but the problem is when I reboot it. Having to go to each app''s > dir and restart mongrel is a pain, so I would like to know if there''s > already something (maybe a rake task or bash script) that solves this > problem? If not, what would be the recommended way? A bash script? > > Thanks in advance. > > > >Use whatever mechanism your OS uses for other services, likely an rc script. Pat --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Pat, thanks for the reply. So basically I should add to the script a line to start mongrel for each Rails app I have on the server? On 10/31/07, Pat Maddox <pergesu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Oct 30, 2007 7:55 PM, Marcelo de Moraes Serpa <celoserpa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > Hello list, > > > > I''ve got a server with several Rails application running under mongrel. > It > > works fine, but the problem is when I reboot it. Having to go to each > app''s > > dir and restart mongrel is a pain, so I would like to know if there''s > > already something (maybe a rake task or bash script) that solves this > > problem? If not, what would be the recommended way? A bash script? > > > > Thanks in advance. > > > > > > > > > Use whatever mechanism your OS uses for other services, likely an rc > script. > > Pat > > > >--~--~---------~--~----~------------~-------~--~----~ 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 @reboot in cron: @reboot cd /www/eq2guild/guildcorner/current && ./script/spin @reboot cd /www/blog/flame-blog/current && ./script/spin ... That starts the tasks as a user I choose (in my case, the user is named ''webtoys'') and since cron starts very late in the OS boot process, things will generally be well up and running before my application starts. Note that if you put them in an rc script, they might run as root unless you specifically ask them them not to. And then what happens if you mess up that file? Will the system still boot? Running things in a crontab also has the advantage that anyone who can run the crontab command can set it up -- no special root privs needed. --Michael --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Marcelo In the Win2003 server environment, just set each mongrel service to start automatically. CCH http://cch4rails.blogspot.com On Oct 31, 10:55 am, "Marcelo de Moraes Serpa" <celose...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello list, > > I''ve got a server with several Rails application running under mongrel. It > works fine, but the problem is when I reboot it. Having to go to each app''s > dir and restart mongrel is a pain, so I would like to know if there''s > already something (maybe a rake task or bash script) that solves this > problem? If not, what would be the recommended way? A bash script? > > Thanks in advance.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Linux systems, aren''t daemon tools or runit a more attractive option? These have the added benefit of restarting Mongrel whenever it stops, regardless of the reason. I used to have this working using mongrel_cluster, but I haven''t had it working right since switching to Capistrano 2.1. Cap2.1 doesn''t support the mongrel_cluster gem, and I haven''t fully figured out everything necessary to make it work again. I also have a backgroundrb task to restart. Anyone have the magic for runit? On Oct 31, 8:20 am, CCH <c...-Z/Eug3sLCsSPzdAsCNHSEg@public.gmane.org> wrote:> Hi Marcelo > > In the Win2003 server environment, just set each mongrel service to > start automatically. > > CCHhttp://cch4rails.blogspot.com > > On Oct 31, 10:55 am, "Marcelo de Moraes Serpa" <celose...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > Hello list, > > > I''ve got a server with several Rails application running under mongrel. It > > works fine, but the problem is when I reboot it. Having to go to each app''s > > dir and restart mongrel is a pain, so I would like to know if there''s > > already something (maybe a rake task or bash script) that solves this > > problem? If not, what would be the recommended way? A bash script? > > > Thanks in advance.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---