I'm running merb in production, and using monit to handle start on boot and to monitor. A couple of things:
I had to upgrade (just recently) to 0.9.1 to fix a bug whereby a call to start would always clear the PID regardless of if it was already running -- you'd lose the PID of the current running process. The reason you're seeing problems with -k is that there are no PIDs, and it doesn't know how to stop them. Now, it works great and tells you it's already running and leaves the PID file alone. Here's my monit script (it's actually a capistrano script that sets up monit in general, and monit for mongrel and merb): http://pastie.textmate.org/165153 I've noticed when I start merb using this capistrano recipe I wrote: http://pastie.textmate.org/165156 It uses the cluster-nodes, so the ps processes all look like: /usr/bin/ruby /usr/bin/merb --merb-root /var/www/apps/my_app/current --daemonize --cluster-nodes 3 --port 4000 --environment production --log /var/www/apps/my_app/current/log/merb.log But when they get restarted, they use the individual merb command (without the cluster-nodes and with the --port 400x explicitly specified). They seem to work fine like that. The important thing is to tell monit to start merb using your uid and guid for the correct user when monit restarts. mongrel_cluster can handle changing to the appropriate user for you, but when you use merb directly, it cannot. I have an apache rule that circumvents calls to rails, as merb is insanely faster, but even if they go down, rails would (slowly) pick up the slack. Hope that helps. -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com main: 404.394.4935 fax: 678.826.0969 Scout - Web Monitoring and Reporting Software www.scoutapp.com On 3/13/08, Jim Freeze <[EMAIL PROTECTED]> wrote: > On Mar 13, 2008, at 4:24 AM, Tim Perrett wrote: > > > Hey All, > > > > I just wanted to get other peoples take on problems when running merb > > in production? Just as Rails used to do, the mongrels tend to get > > heavy/unresponsive over time so need a good kicking by a watcher > > daemon like god or monit. However, I have had serious problems getting > > God to restart the process, as the "merb -k <port>" command doesnt > > appear to work reliably and it cant kill off the old merb successfully > > so restarting the new one fails :'( > > > Are you running one mongrel or multiple. I have a site that I haven't > touched > for 6months and it is running fine. > > > Jim > _______________________________________________ > Merb-devel mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/merb-devel > _______________________________________________ Merb-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/merb-devel
