I am running a simple query to get data out of my database & display them. I'm getting an error that says Response Buffer Limit Exceeded
.
Error is : Response object error 'ASP 0251 : 80004005'
Response Buffer Limit Exceeded
/abc/test_maintenanceDetail.asp, line 0
Execution of the ASP page caused the Response Buffer to exceed its configured limit.
I have also tried Response.flush
in my loop and also use response.buffer = false
in my top of the page, but still I am not getting any data.
My database contains 5600 records for that, Please give me some steps or code to solve the issue.
This question is related to
asp-classic
buffering
You can increase the limit as follows:
I rectified the error 'ASP 0251 : 80004005' Response Buffer Limit as follow:
To increase the buffering limit in IIS 6, follow these steps:
Click Start, click Run, type cmd, and then click OK. Type the following command, and then press ENTER: cd /d %systemdrive%\inetpub\adminscripts Type the following command, and then press ENTER: cscript.exe adsutil.vbs SET w3svc/aspbufferinglimit LimitSize Note LimitSize represents the buffering limit size in bytes. For example, the number 67108864 sets the buffering limit size to 64 MB. To confirm that the buffer limit is set correctly, follow these steps:
Click Start, click Run, type cmd, and then click OK. Type the following command, and then press ENTER: cd /d %systemdrive%\inetpub\adminscripts Type the following command, and then press ENTER: cscript.exe adsutil.vbs GET w3svc/aspbufferinglimit
If you are looking for the reason and don't want to fight the system settings, these are two major situations I faced:
I faced the same kind of issue, my IIS version is 8.5. Increased the Response Buffering Limit
under the ASP -> Limit Properties
solved the issue.
ASP
option.Response Buffering Limit
to 40194304
(approximately 40 MB) .I know this is way late, but for anyone else who encounters this problem: If you are using a loop of some kind (in my case, a Do-While) to display the data, make sure that you are moving to the next record (in my case, a rs.MoveNext).
The reason this is happening is because buffering is turned on by default, and IIS 6 cannot handle the large response.
In Classic ASP, at the top of your page, after <%@Language="VBScript"%>
add:
<%Response.Buffer = False%>
In ASP.NET, you would add Buffer="False"
to your Page directive.
For example:
<%@Page Language="C#" Buffer="False"%>
It can be due to CursorTypeEnum also. My scenario was the initial value equal to CursorTypeEnum.adOpenStatic 3.
After changed to default, CursorTypeEnum.adOpenForwardOnly 0, it backs to normal.
Here is what a Microsoft support page says about this: https://support.microsoft.com/en-us/help/944886/error-message-when-you-use-the-response-binarywrite-method-in-iis-6-an.
But it’s easier in the GUI:
If you are not allowed to change the buffer limit at the server level, you will need to use the <%Response.Buffer = False%> method.
HOWEVER, if you are still getting this error and have a large table on the page, the culprit may be table itself. By design, some versions of Internet Explorer will buffer the entire content between before it is rendered to the page. So even if you are telling the page to not buffer the content, the table element may be buffered and causing this error.
Some alternate solutions may be to paginate the table results, but if you must display the entire table and it has thousands of rows, throw this line of code in the middle of the table generation loop: <% Response.Flush %>. For speed considerations, you may also want to consider adding a basic counter so that the flush only happens every 25 or 100 lines or so.
Drawbacks of not buffering the output:
See this KB article for more information http://support.microsoft.com/kb/925764
Hope that helps.
Thank you so much! <%Response.Buffer = False%> worked like a charm! My asp/HTML table that was returning a blank page at about 2700 records. The following debugging lines helped expose the buffering problem: I replace the Do While loop as follows and played with my limit numbers to see what was happening:
Replace
Do While not rs.EOF
'etc .... your block of code that writes the table rows
rs.moveNext
Loop
with
Do While reccount < 2500
if rs.EOF then recount = 2501
'etc .... your block of code that writes the table rows
rs.moveNext
Loop
response.write "recount = " & recount
raise or lower the 2500 and 2501 to see if it is a buffer problem. for my record set, I could see that the blank page return, blank table, was happening at about 2700 records, good luck to all and thank you again for solving this problem! Such a simple great solution!
One other answer to the same error message (this just fixed my problem) is that the System drive was low on disk space. Meaning about 700kb free. Deleting a lot of unused stuff on this really old server and then restarting IIS and the website (probably only IIS was necessary) cause the problem to disappear for me.
I'm sure the other answers are more useful for most people, but for a quick fix, just make sure that the System drive has some free space.
In my case i just have writing this line before rs.Open .....
Response.flush
rs.Open query, conn
Source: Stackoverflow.com