[Mailman-Users] Mailman issue downloading full raw archive

Mark Sapiro msapiro at value.net
Tue Nov 14 03:53:03 CET 2006

Jared Nyland wrote:
>I have recently run into an issue with downloading the full raw archive on
>one list.  The archive has reached 1086 MB in size and I now get this
>error.  Has anyone seen this before or know how to resolve it.
>Traceback (most recent call last):
>   File "/usr/lib/mailman/scripts/driver", line 87, in run_main
>    main()
>   File "/usr/lib/mailman/Mailman/Cgi/private.py", line 162, in main
>    sys.stdout.write(f.read())
>MemoryError: out of memory

What is happening is private.py is copying the list.mbox file to
stdout, but it is doing this by reading the entire file into memory
and then writing it back out to stdout. Thus, eventually you will
reach som limit on how big the CGI can grow and you get the memory

You could make the archive public which allows the web server to access
the file directly via the 'pipermail' URL. If you don't want to make
the archive public, you could create an alias within the web server to
access the file and use .htaccess control to limit access.

Perhaps better than any of these is to patch Mailman/Cgi/Private.py.
The last few lines of this file are

        print 'Content-type: %s\n' % ctype

If you change these to

        print 'Content-type: %s\n' % ctype
        line = f.readline()
        while line:
            line = f.readline()

I think it will avoid the problem.

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list