[Zope-dev] Downloading large files

John Eikenberry jae@kavi.com
Tue, 28 Mar 2000 21:19:29 -0800 (PST)


Here's the deal. We have a download area on one of our Zope sites. It
contains a few fairly large files (between 45-60Meg). 

When downloading these files, the Zope process grows by the amount of the
file. Ending up at 50+ meg in active memory. The server we run on has a
per process memory limitation of ~70Meg (this cannot be raised or
avoided). Thus, if 2 people try to download files at the same time... Zope
crashes. 

At the moment the files are just normal file type objects, accessed via
normal links. 

I've messed around with various other download methods (variations using
RESPONSE.write), but with no luck.

How would I stream a file so that while downloading it doesn't increase
the size of the Zope process significantly? Sort of like handling file
processing by using a while loop over file.readline() rather than a for
loop over file.readlines(). 

Thanks in advance for any advice.

---

John Eikenberry
[jae@kavi.com - http://zhar.net/] 
______________________________________________________________
"A society that will trade a little liberty for a little order
 will deserve neither and lose both."
                                         --B. Franklin