Hi Mark,

Great Thanks for the help on this issue.  I have added that code to my
private.py and now I am getting this error.


Traceback:

Traceback (most recent call last):
  File "/usr/lib/mailman/scripts/driver", line 88, in run_main
    sys.__stdout__.write(tempstdout.getvalue())
MemoryError



Thanks
Jared





On 11/13/06, Mark Sapiro <[EMAIL PROTECTED]> wrote:
>
> 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
> error.
>
> 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
>
>     else:
>         print 'Content-type: %s\n' % ctype
>         sys.stdout.write(f.read())
>         f.close()
>
> If you change these to
>
>     else:
>         print 'Content-type: %s\n' % ctype
>         line = f.readline()
>         while line:
>             sys.stdout.write(line)
>             line = f.readline()
>         f.close()
>
> I think it will avoid the problem.
>
> --
> Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan
>
>
------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to