[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Out of memory problems with Downloadable products.
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?
Thanks in advance.
Nathan Pitts