Skip to Content.
Sympa Menu

en - Re: [solved] Re: [sympa-users] How to tell Sympa to process message

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Mark Sallee <address@concealed>
  • To: Paul Menzel <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [solved] Re: [sympa-users] How to tell Sympa to process message
  • Date: Fri, 20 Mar 2009 13:45:56 -0600


Paul Menzel wrote:
> Dear David,
>
>
> If your message is in the msg spool, it will be processed. If it is not,
> then it is likely that Sympa is stopped, or your message still contains
> errors. If it is in the msg/bad/ spool, just copy it back to msg and it
> will be sent.
>
>
> Trying to send the big message sympa was killed every time by the OOM
> (Out of memory) killer of Linux (see other message). Moving this message
> to bad fixed the problem for now (until the next big message gets
> delivered). Maybe there is a way to debug why that much memory is
> needed.
>
>
> Thanks for your answer and have a nice weekend,
>
> Paul
>

Paul,
We still occasionally have this same problem with Sympa Out of Memory,
so we created a script running frequently in cron to check that two
sympa.pl processes are always running (since we are in 'distribution'
mode), and if there are not two processes, restart them. It's a kind of
band-aid fix, but it has helped. We no longer have to get calls from
users that a message hasn't gone out. The basics of the script are
attached.


Mark Sallee, Systems Administrator


#!/usr/bin/perl
# Script to check that 2 sympa.pl processes are running, and restart them if
# needed. Must be run as sympa user. Requires sudo rights for sympa user to
/etc/init.d/sympa. Written by msallee Jan-09

$SYMPAPLS=`ps -ef | grep sympa.pl | grep -v "grep" | wc -l`;
# Set this downtime flag to yes to disable checking if you are working on
sympa
$DOWNTIME_FLAG='no';
$DATE=`date +%m%d%y`;
$SERVERNAME="sympa.domain";

# Do nothing if there are 2 sympa.pl processes running; restart if ==1 or ==0
if ($SYMPAPLS == 2)
{
print "Number of sympa processes running: $SYMPAPLS is normal.\n";
}

elsif ($SYMPAPLS == 1 && $DOWNTIME_FLAG eq "no") {
print "Number of sympa processes $SYMPAPLS only equal to 1. Restarting
sympa.pl\n";
# Restart one sympa.pl process, assuming one has died.
`/home/sympa/bin/sympa.pl`;
&mailadmin;
} # end elsif == 1

elsif ($SYMPAPLS == 0 && $DOWNTIME_FLAG eq "no") {
# Restart all sympa processes, because it's dead in the water
print "Sympa processes == 0, we need to restart all sympa
processes.\n/etc/init.d/sympa restart\n";
`sudo /etc/init.d/sympa restart`;
} # end elsif == 0

elsif ($DOWNTIME_FLAG eq "yes") {
print "Downtime mode enabled. No services will be touched until you
set\n";
print " DOWNTIME_FLAG back to 'no'\n";
} # end elsif downtime

#######################################
sub mailadmin {

# Mail a message alert

$title='Mail alert for sympa procs';
$address@concealed';
$address@concealed';
$subject='Sympa process automatically restarted by cron on sympa';

open(MAIL, "|/usr/sbin/sendmail -t");

# Mail header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
# Mail body
print MAIL "Sympa process had to be restarted. Check logs for memory
error.\n";

close(MAIL);
} # end of mailadmin subroutine



Archive powered by MHonArc 2.6.19+.

Top of Page