[Mongrel] Restarting mongrel cluster from other directories

Joey Geiger jgeiger at gmail.com
Thu Nov 30 15:02:08 EST 2006

Monit is the way to go.

I've setup monit to restart when the mongrel starts to use more than
80MB, and when it's not available. (When I rotate the logs, I have a
script that will kill one mongrel process every 30 seconds, until they
have all rotated.)

There were a few examples posted on the list a while back that should
help you out.

On 11/30/06, Joe Ruby <joeat303 at yahoo.com> wrote:
> I want to restart my Mongrels from crontab
> periodically to free up memory. I tried this:
> [admin at mudcrapce ~]$ mongrel_rails cluster::restart -C
> /var/www/apps/mudcrapce/current/config/mongrel_cluster.yml
> Restarting 5 Mongrel servers...
> mongrel_rails restart -P log/mongrel.3040.pid
> !!! PID file log/mongrel.3040.pid does not exist. Not
> running?
> mongrel::restart reported an error. Use mongrel_rails
> mongrel::restart -h to get help.
> Mongrel's cluster restart has these options:
> [admin at mudcrapce ~]$ mongrel_rails cluster::restart -h
> Usage: mongrel_rails <command> [options]
>     -C, --config PATH                Path to config
> file
>     -s, --soft                       Do a soft restart
> rather than a process exit restart
>     -h, --help                       Show this message
>         --version                    Show version
> I see regular Mongrel has a chdir option for restart:
> -c, --chdir PATH                 Change to dir before
> starting (will be expanded)
> But I don't think that'd work for clusters.
> Any ideas? I also hear that perhaps Monit could be
> used for restarting processes if they start using too
> much memory.
> Thanks,
> Joe
> ____________________________________________________________________________________
> Want to start your own business?
> Learn how on Yahoo! Small Business.
> http://smallbusiness.yahoo.com/r-index
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list