[Mongrel] Rotating mongrel production logs
jgeiger at gmail.com
Thu Feb 14 15:49:43 EST 2008
Umm, why are you restarting your mongrels at all?
copytruncate allows the processes to write to the log file without restarting
The only issue is you may lose a few requests while it's rotating, but
in my case, I'm using the nginx logs to provide the stats anyway.
On Thu, Feb 14, 2008 at 2:32 PM, Nate Vack <njvack at wisc.edu> wrote:
> 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.
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
More information about the Mongrel-users