Response Buffer Limit Exceeded

后端 未结 11 1261
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 10:05

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.

相关标签:
11条回答
  • 2020-12-08 10:13

    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:

    1. slowdown of overall page load
    2. tables and columns will adjust their widths as content is populated (table appears to wiggle)
    3. Users will be able to click on links and interact with the page before it is fully loaded. So if you have some javascript at the bottom of the page, you may want to move it to the top to ensure it is loaded before some of your faster moving users click on things.

    See this KB article for more information http://support.microsoft.com/kb/925764

    Hope that helps.

    0 讨论(0)
  • 2020-12-08 10:14

    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

    refers to https://support.microsoft.com/en-us/kb/944886

    0 讨论(0)
  • 2020-12-08 10:15

    In my case i just have writing this line before rs.Open .....

    Response.flush

    rs.Open query, conn

    0 讨论(0)
  • 2020-12-08 10:25

    If you are looking for the reason and don't want to fight the system settings, these are two major situations I faced:

    1. You may have an infinite loop without next or recordest.movenext
    2. Your text data is very large but you think it is not! The common reason for this situation is to copy-paste an Image from Microsoft word directly into the editor and so the server translates the image to data objects and saves it in your text field. This can easily occupies the database resources and causes buffer problem when you call the data again.
    0 讨论(0)
  • 2020-12-08 10:28

    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).

    0 讨论(0)
  • 2020-12-08 10:30

    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:

    • In Internet Information Services (IIS) Manager, click on ASP.
    • Change Behavior > Limits Properties > Response Buffering Limit from 4 MB to 64 MB.
    • Apply and restart.
    0 讨论(0)
提交回复
热议问题