Response Buffer Limitations (IIS6.0 vs. IIS5.0)

Results 1 to 2 of 2

Thread: Response Buffer Limitations (IIS6.0 vs. IIS5.0)

  1. #1
    Join Date
    Dec 1969

    Default Response Buffer Limitations (IIS6.0 vs. IIS5.0)

    I am encountering an odd behavior with our web application on our w2k3 server system (IIS6.0), that does not appear to occur on w2k (IIS 5.0).<BR><BR>In our application we are attempting to send a large amount (= ~10MB) of data through Response.Write to a client browser (Below is a contrived case that demonstrates the issue):<BR><BR>&#060;%<BR>Option Explicit<BR>Response.Expires = -1<BR>%&#062;<BR>&#060;%<BR>dim i<BR>for i = 1 to 1<BR>dim fso : set fso = CreateObject("Scripting.FileSystemObject")<BR>dim stream : set stream = fso.OpenTextFile("c:BigTestKing_arthur.txt", 1, FALSE)<BR>dim buffer : buffer = stream.Read(8192)<BR>do<BR>Response.Write buffer<BR>buffer = stream.Read(8192)<BR>loop while len(buffer) = 8192<BR>Response.Write buffer<BR>next<BR>%&#062;<BR><BR>King_arthur.txt is a 10MB file, therefore when the loop ends at 10, we are looking at 100MB getting fired to the browser. Buffering is ENABLED (hence the problem).<BR><BR>On W2k (IIS 5.0), the ASP page fires all 100MBs to the browser without barking.<BR><BR>On w2k3 (IIS 6.0), after 4mb of data sent, the Response.Write call throws an error saying "Response Buffer Limit Reached".<BR><BR>I found under the MSDN docs for Response.Write (and .BinaryWrite)<BR>that the Response.Buffer is limited by default to 4mb in size. Which makes sense, except that the documents claim to apply to IIS5.0 as well.<BR><BR>So why isn&#039;t IIS5.0 breaking down also??? The only thing I can figure is that the documentation was wrong as far as the buffer limits is concerned, and that IIS5.0 has no buffer limit on it. Which leads me to beleive that there is a document (or should be one) that will say what changed between IIS5.0 and 6.0 (Some things you thought were true are now false, but we won&#039;t tell you what).<BR><BR>Also, correct me if I&#039;m wrong, but wouldn&#039;t the correct thing to do when the buffer gets full is to flush it to the browser and start with a fresh buffer? I&#039;m glad the O/S doesn&#039;t complain like this when file buffers get full.<BR><BR>For now, I will turn off buffering for this file (which works, BTW), and increase the write chunks to 128K for less latency in the transmission. Still, I&#039;d like to get some confirmation so we can check any other of our "data push" pages we have and make sure we won&#039;t have problems with any big chunks of data overflowing the buffer.<BR><BR>Thanks for any illumination you can provide.<BR>Lewis Jones,<BR>"Accidental" ASP troubleshooter.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Response Buffer Limitations (IIS6.0 vs. IIS5.0

    well, I suspect that IIS6.0 has the 4Mb buffer to prevent overloading as part of the &#039;tighter, more secure&#039; IIS model. It should be possible to increase this using the Metabase, but I reckon just turning buffering off for this file should be fine.<BR><BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts