[Mongrel] Rotating mongrel production logs
njvack at wisc.edu
Thu Feb 14 15:32:41 EST 2008
On Thu, Feb 14, 2008 at 1:44 PM, Sean Brown <seanmichaelbrown at gmail.com> wrote:
> On Thu, Feb 14, 2008 at 2:08 PM, Nate Vack <njvack at wisc.edu> wrote:
> > Why not ask monit to restart your mongrels? It seems kind of nice to
> > have monit be the only guy in town touching the processes it
> > monitors.... but maybe there's a technical reason why not?
> No technical reason. Simply timing. Monit wakes itself every X
> minutes to check if processes are running, so there could be a delay
> of up X minutes until the mongrel process was restarted. The approach
> in the logrotate restarts the mongrels immediately. Interestingly,
> monit does realize that the process ID for each mongrel has changed
> and alerts of that fact, but since we know that will happen every
> Sunday at 3:00 AM, we can safely ignore it.
I'm pretty sure that doing:
monit restart all -g your_mongrel_group
will wake monit up and have it restart your app before hitting its
timeout. This also avoids the worried emails from monit; ignoring 'PID
changed' messages from monit (even if you're expecting them) is a bad
habit to get into.
More information about the Mongrel-users