[Mongrel] Restarting mongrel cluster from other directories

Joe Ruby joeat303 at yahoo.com
Thu Nov 30 12:10:13 EST 2006

I want to restart my Mongrels from crontab
periodically to free up memory. I tried this:

[admin at mudcrapce ~]$ mongrel_rails cluster::restart -C

Restarting 5 Mongrel servers...
mongrel_rails restart -P log/mongrel.3040.pid
!!! PID file log/mongrel.3040.pid does not exist. Not
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
    -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.


Want to start your own business?
Learn how on Yahoo! Small Business.

More information about the Mongrel-users mailing list