Response buffer help needed

S

Steven Bazeley

I had a download failure problem with a 95MB wmv file. I thought it was my
code

but I could not find anything wrong. So I tested the download by replacing
the 95MB

file with a smaller one (20MB). It worked fine. When I contacted my hosting
company

this is what they told me.





(Data streamed through the Response buffer will be held in memory. We allow
a maximum of 100MB memory usage per site.

The 100MB memory limit is applied to the site's application process. Your
site itself is using about 30-50MB on average. So you add 95.1MB on top of
that and it will go over the 100MB. Once this limit is reached, we restart
the process, thus resulting in the failure of the download.)



So the reason for this post is. I don't understand how the response buffer
works. Why is it that the data in the response buffer is held in memory. In
my code I always clear the buffer when I'm done with it. How are they
figuring that my site is averaging 30-50MB?

I guess I'm just looking for information, so I can do a work around. Any
pointers would be appreciated.
 
C

Craig Deelsnyder

Steven said:
I had a download failure problem with a 95MB wmv file. I thought it was my
code

but I could not find anything wrong. So I tested the download by replacing
the 95MB

file with a smaller one (20MB). It worked fine. When I contacted my hosting
company

this is what they told me.





(Data streamed through the Response buffer will be held in memory. We allow
a maximum of 100MB memory usage per site.

The 100MB memory limit is applied to the site's application process. Your
site itself is using about 30-50MB on average. So you add 95.1MB on top of
that and it will go over the 100MB. Once this limit is reached, we restart
the process, thus resulting in the failure of the download.)



So the reason for this post is. I don't understand how the response buffer
works. Why is it that the data in the response buffer is held in memory. In
my code I always clear the buffer when I'm done with it. How are they
figuring that my site is averaging 30-50MB?

I guess I'm just looking for information, so I can do a work around. Any
pointers would be appreciated.

Are you doing a Response.BinaryWrite? If so, it'll load up the whole
file and then shove it down the pipe, hence your memory issues.

Try buffering/streaming the file...

http://www.cnblogs.com/bestcomy/archive/2004/08/10/31950.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top