Re: out of memory error / best practices for pushing out large data
Re: out of memory error / best practices for pushing out large data
- Subject: Re: out of memory error / best practices for pushing out large data
- From: email@hidden
- Date: Sun, 28 Aug 2005 15:37:34 +1200
Hello Jamie;
...The component uses appendToResponse to push out the download.
The files are anywhere from 50 to several hundred megs. This often
leads to an "Out of Memory" error when I try to push the file out
to the user.
Depending on the content-generation infrastructure of your system,
you could make a "component action" or "direct action" that returns a
WOResponse instance where you have used the "setContentStream
(...)" [see API docs] method to get the response to stream out the
data rather than deliver it from data or a string. This seems to
work well for me in situations where large quantities of data need to
be moved over HTTP without timing out the request or consuming all
the memory resources of the virtual machine.
cheers.
___
Andrew Lindesay
www.lindesay.co.nz
+64-21-47-0929
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden