[ic] Out of memory problems with Downloadable products.

Mike Heins interchange-users@icdevgroup.org
Wed Oct 2 17:32:01 2002


Quoting Nathan Pitts (npitts@cybernet.com):
> 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?

You have to have interchange symlink in the ISO and hand it off to
HTTP or FTP. There have been multiple examples of this on this list over
the years.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Software axiom: Lack of speed kills.