Menu

#16 archivemail dies w/ MemoryError

open
None
5
2006-11-08
2006-05-18
Anonymous
No

Archivemail dies with a "MemoryError" on a certain
mbox. I can provide more debugging information if you
let me know what to give. The archivemail process
itself doesn't seem to be sucking down much memory
during this, so I don't think it's a problem with the
system running out of memory / swap.

This is on a 345M folder, which may contain some big
messages.

archivemail v0.6.1
$ archivemail -v -D "30 apr 2006"
/home/xxxxx/mymaildir/PG_Reports

message is 1812.20 days older than the specified date
message is not flagged important
decision: archive message
saving message to file
'/tmp/@27975.0archivemail/@27975.1archive.gz'
Traceback (most recent call last):
File "/home/william/bin/archivemail", line 1298, in ?
main()
File "/home/william/bin/archivemail", line 619, in main
archive(mailbox_path)
File "/home/william/bin/archivemail", line 1036, in
archive
_archive_mbox(mailbox_name, final_archive_name)
File "/home/william/bin/archivemail", line 1105, in
_archive_mbox
msg = original.next()
File "/usr/lib/python2.2/mailbox.py", line 34, in next
return self.factory(_Subfile(self.fp, start, stop))
File "/usr/lib/python2.2/rfc822.py", line 106, in
__init__
self.readheaders()
File "/usr/lib/python2.2/rfc822.py", line 153, in
readheaders
line = self.fp.readline()
File "/usr/lib/python2.2/mailbox.py", line 63, in
readline
data = self.fp.readline(length)
MemoryError

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I'm having the same exact problem. I corrected it by
    removing the message it got stuck on (after seeing it with
    the -v arg), but I'd rather have it go through without
    erroring out randomly.

    Micheal

     
  • Nobody/Anonymous

    Logged In: NO

    I think the problem is when pass a large amount of data to a
    single archivemail process. I was able to work around it
    using a little bit of bash:

    for i in `ls /var/spool/mail`; do archivemail -d 60 -o
    /var/spool/bak /var/spool/mail/$i; done

    hope this helps.

     
  • Nikolaus Schulz

    Nikolaus Schulz - 2006-11-08
    • assigned_to: nobody --> nikosch
     
  • Nikolaus Schulz

    Nikolaus Schulz - 2006-11-08

    Logged In: YES
    user_id=1594781

    I cannot reproduce this. My box has 256MB memory. I've disabled swap and hammered archivemail with a 370MB mbox containing 52000 messages and at least one large message (26 MB attachment). 274MB got archived. No problem.
    TTBOMK even no indication that the system's struggling with memory.

    Besides, it is the rfc822 module throwing the exception, so I guess it's the module's implementation that is overstretched here, not archivemail itself.

    But I'd be interested in mailboxes triggering that exception, so if you think you can give away one that hasn't too private content, feel free to email me about that. (Of course we would have to stick to FTP or HTTP for the transfer of such a large mailbox.)

    Hmm, do I understand correctly that it depends on the total volume of the mailboxes an archivemail process is archiving? Weird. I fail to see how multiple mailboxes can add up in any way to hit some limit.

    Nikolaus

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.