procmail
[Top] [All Lists]

Re: Error while writing to <mbox file>

2005-10-03 20:59:39
* Gary Funck <gary(_at_)intrepid(_dot_)com> [2005-10-03 19:56]:

It is unlikely, on any sort of modern OS implementation, that your
program is failing due to the size of the mbox exceeding 150 meg/so.
To append, the OS simply needs to find a block and add it to the
file's allocation.  Now, if the file system is 99.9% full, that's
another matter.  Check to make sure there is no file space shortage
for the filesystem where your mailbox, and/or your log file lives.

It's 91% full.. so no issue there.  

Mutt takes a heck of a long time to load such a huge mbox, so I've
decided to break mythtv posts into quarterly files anyway.  I'm using
this (abridged) recipe to determine what quarter of a year the post
belongs in:

   :0
   *$ 1^0 ^Date:.*(Jan|Feb|Mar)
   *$ 2^0 ^Date:.*(Apr|May|Jun)
   *$ 3^0 ^Date:.*(Jul|Aug|Sep)
   *$ 4^0 ^Date:.*(Oct|Nov|Dec)
   { STATED_QUARTER = $=}

#...a few thousand sloc later...#

   # Mailman and ezmlm lists
   #
   :0
   *$ ^List-Id:.*\/$MAILMAN_ML
   * MATCH ?? ()\/[^\.]+
   {
     LISTNAME=`echo $MATCH | tr '[:upper:]' '[:lower:]'`

     :0 fhw
     | $SED -e "/^Subject:/ s/ *\[$LISTNAME\] */ /I"

     :0:
     *$ ^List-Id:.*mythtv
     mailing_lists/${LISTNAME:-no_list}_${YEAR:-0000}_QTR${STATED_QUARTER:-0000}

     :0:
     mailing_lists/${LISTNAME:-no_list}_${YEAR:-0000}
   }

Hopefully that helps.

The fact that the failure is sporadic may indicate that multiple
processes are competing for the same resource and sometimes losing.
Your logfile says the locking worked fine on mbox delivery.  We
should then also consider the log file, which must also be
interlocked.  Check again that the logfile isn't too big (ie, over
quota) or on a file system that is nearly out of space.

It's on the same filesystem.  I actually log each process (and
therefore message) to a seperate file, but the piece of code that
executes at the very beginning before the "LOGFILE = $LOGDIR/$$.log"
instruction executes all gets logged to an initial log file that grew
to 160 megs.  So I rotated that.  

I'll report back on whether this works.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail