[ic] Re: Out of memory problems with Downloadable products.

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Wed Oct 2 14:34:01 2002


On Wed, Oct 02, 2002 at 07:54:33PM +0200, racke@linuxia.de wrote:
> Nathan Pitts writes: 
> 
> >Hello.
> > I have recently put Interchange online as the ecommerce application for 
> >my company. We are offering our software products for download, available 
> >as CD-ROM ISO images.
> > Each time that a customer attempts to download a product, the webserver 
> >runs out of  memory.
> > I have figured out what the problem is, but not how to fix it.
> > It appears that in /usr/lib/interchange/bin/interchange, a download is 
> >handled by a subroutine called do_deliver. This do_deliver sub is a call 
> >to /usr/lib/interchange/lib/Vend/Util.pm->readfile and then a call
> >to /usr/lib/interchange/lib/Vend/Server.pm->respond.
> > The problem is that Util::readfile performs a "slurp" on the file to be 
> >delivered, meaning it tries to read the entire file into memory before 
> >delivering it. With a 650 MB ISO image, this is not a viable solution, 
> >especially considering that more than one user may be downloading at 1 
> >time.
> > Has anyone out there used Interchange to serve large downloads? Is it 
> >possible?
> 
> Not yet. But it would be nice to have a version of read_file which
> supports file reading in chunks. 
> 
> Ask your favourite Interchange consultant to implement this feature. 

Or just send a redirect to the ISO image url.  Don't suck it into ram.
You might copy to a temporary file if you need unique names.  Send the
customer email advice with the url so when it fails because he doesn't
have enough disk space he can come back.  Tell him how long the image
will be available before it expires.



> 
> Bye
>    Racke 
> 
> 
> 
> -- 
> Prolific Interchange Consulting (Excellent German Quality !).
> Take a look at Materialboerse (http://www.materialboerse.de/), WITT
> (http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
> Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us. 
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 

-- 

Christopher F. Miller, Publisher                               cfm@maine.com
MaineStreet Communications, Inc           208 Portland Road, Gray, ME  04039
1.207.657.5078                                         http://www.maine.com/
Content/site management, online commerce, internet integration, Debian linux