bottlenecking?

Julian Field mailscanner at ecs.soton.ac.uk
Thu Sep 26 10:56:21 IST 2002


At 03:19 26/09/2002, you wrote:
>On Wed, 2002-09-25 at 17:48, Julian Field wrote:
> > Quoting Tim Tyler <tyler at BELOIT.EDU>:
> > > Mailscanner experts,
> > >    We are currently running mailscanner 2.6 on AIX4.3.3
> > > systems.  Occassionally, we have noticed that mailscanner clogs up at
> > > peak
> > > periods and can't seem to process email for hours.  This means that local
> > > or remote mail is stuck in /var/spool/mqueue.in for hours before
> > > eventually
> > > making it to the normal sendmail mqueue (if at all).   If I kill the
> > > mailscanner process and restart it everything gets processed nearly
> > > immediately.
> > >
> > >   Isn't mailscanner_check running in crontab supposed to make sure that
> > > the
> > > process is running ok?  It would really be better if it simply killed the
> > > existing process every time and restarted it.  I suggest this because if
> > > it
> > > thinks the process is running ok when it isn't, then its useless.
> > > Anyone's
> > > thoughts about killing and restarting the process every 20 minutes or so?
> > >
> > >   Are there any other suggestions for configurations that can minimize
> > > bottlenecking?
> >
> > Not sure why you are hitting the problem. However, what you could do is set
> > the "Restart Every" interval much shorter. Then MailScanner will re-exec
> > itself more frequently, which will probably work around whatever the
> > underlying problem is. "Restart Every = 1200" would make it restart
> every 20
> > minutes.
> >
>FWIW: I've seen this sort of problem to one degree or another with every
>V3 version of MailScanner that I've deployed. Its too soon to say if v4
>will have the same sorts of problems. My solution is to use a smart Perl
>monitor, rather than a shell script, to manage the MailScanner
>processes. The perl code watches for excessive CPU consumption,
>excessive process size, or a MailScanner that's run longer than it
>should. If any of the boundary conditions are seen the offending process
>is killed and restarted. While I suppose a clever shell script could be
>written to do the same thing it was very easy to do with Perl and I took
>the path of least resistance.

It would be interesting to discover what is actually causing the problem,
as I've never seen it on our systems here at all. Have you checked
everywhere under /var/spool/MailScanner for "core" files? These can take a
very long time to scan, and should just be deleted most of the time. If
many other people were seeing the same problem as you, I would have heard
about it a lot. And I haven't, so I can only think this is a fairly unusual
problem.

>The V4 implementation brings new challenges. Not only do you have the
>mater process, but you also have a number of child processes to deal
>with. I'd like to see a pid file for each of the children, perhaps with
>a name of the form mailscanner1.pid, mailscanner2.pid, etc. And it would
>be awfully nice is killing the master process would cause it to reap its
>children.

I happened to write that for you last night. There are pid files for all of
the children, and the master creates and destroys these as the children
start and stop. I've written an init.d script for it (for RedHat) that has
start, stop, restart, status and reload commands. It does the "reload"
operation by doing a "kill -HUP" on all the MailScanner processes.
--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list