[Mailman-Users] mailman gets stuck, stops sending messages

David Relson relson at osagesoftware.com
Thu Nov 18 13:43:58 CET 2004


On Thu, 18 Nov 2004 07:23:27 -0500 (EST)
Sean wrote:

> > >       I still want to solve the problem, but meanwhile, would
> > >       there be
> > >  any negative effect to adding an hourly cron job to restart
> > >  mailmanctl?  Or perhaps to run a script to check that
> > >  /var/lib/mailman/data/master-qrunner.pid is a valid process ID,
> > >  else restart mailmanctl?
> >
> > 	The latter might be a good idea, but I think the former could be
> > 	a bad one.
> 
> I'm curiuos as to why you feel restarting the mailmanctl every few
> hours is bad?  Running a cron to check for master-qrunner.pid won't
> catch an individual qrunner that dies out.
> 
> Sean

Hi Sean,

I run several low traffic lists (rarely more than 10 messages per day
and fewer than 250 users per list).  I'd worry about a restart while
mailman is in operation.  Not knowing the code, there _could_ be
problems in nuking it unexpectedly.  With my low volume, "unexpected"
isn't likely to cause damage, but I'd be careful.

Several times I've had qrunner tasks die.  My solution is a daily cron
job /usr/local/bin/check.qrunner.sh which knows there should be 8 tasks
running, checks the count, and does the restart.

FWIW, here's the script:

##### /usr/local/bin/check.qrunner.sh #####

#!/bin/sh

PAT="bin/[q]runner"
CNT=`ps alxw | grep $PAT | wc -l | awk '{print $1}'`

if [ -z "$MAILTO" ] ; then
    CMD="cat"
else
    CMD="mail -s\"qrunner check\" $MAILTO"
fi

if [ "$CNT" == "8" ] ; then
    if [ -z "$MAILTO" ] ; then
        echo OK | $CMD
    fi
else
    ( \
        ps alxw | grep $PAT ; \
        ps alxw | grep $PAT | wc -l ; \
        service mailman restart \
    ) | sed "s@\ *.*select S.*   .... @@" \
      | service mailman restart \
      | $CMD
fi



More information about the Mailman-Users mailing list