超出响应缓冲区限制

发布于 2024-10-17 05:46:53 字数 360 浏览 2 评论 0原文

我正在运行一个简单的查询来从我的数据库中获取数据&显示它们。我收到一条错误消息,指出超过响应缓冲区限制

错误是:响应对象错误“ASP 0251:80004005”
超出响应缓冲区限制
/abc/test_maintenanceDetail.asp,第 0 行
ASP 页的执行导致响应缓冲区超出其配置的限制。

我还在循环中尝试了 Response.flush ,并在页面顶部使用了response.buffer = false ,但我仍然没有收到任何数据。

我的数据库包含 5600 条记录,请给我一些步骤或代码来解决该问题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

浅黛梨妆こ 2024-10-24 05:46:53

我知道这已经太晚了,但对于遇到此问题的其他人来说:如果您使用某种循环(在我的例子中是 Do-While)来显示数据,请确保您正在移动到下一条记录(在我的例子中,是 rs.MoveNext)。

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

蝶舞 2024-10-24 05:46:53

以下是 Microsoft 支持页面对此的说明:
https://support.microsoft.com/en-us/help/944886/error-message-when-you-use-the-response-binarywrite-method-in-iis-6-an。

但在 GUI 中更容易:

  • Internet 信息服务 (IIS) 管理器中,单击ASP
  • 改变行为 >限制属性 >响应缓冲限制从 4MB 到 64MB。
  • 应用并重新启动。

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.
绮筵 2024-10-24 05:46:53

发生这种情况的原因是缓冲默认打开,而 IIS 6 无法处理大响应。

在经典 ASP 中,在页面顶部的 <%@Language="VBScript"%> 之后添加:
<%Response.Buffer = False%>

在 ASP.NET 中,您可以将 Buffer="False" 添加到 Page 指令中。
例如:
<%@Page Language="C#" Buffer="False"%>

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"%>

纵情客 2024-10-24 05:46:53

我遇到了同样的问题,我的IIS版本是8.5。增加了 ASP -> 下的响应缓冲限制限制属性解决了这个问题。

  1. 在IIS 8.5中,选择您的项目,您可以在右侧看到选项。在IIS下,您可以看到ASP选项。

ASP 选项

  1. 在选项窗口中,将响应缓冲限制增加到40194304(大约 40 MB)。

增加缓冲区限制

  1. 离开该选项,在右侧顶部您可以看到操作菜单,选择应用。它解决了我的问题。

应用设置

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.

  1. In IIS 8.5, select your project, you can see the options in the right hand side. In that under the IIS, you can see the ASP option.

ASP option

  1. In the option window increase the Response Buffering Limit to 40194304 (approximately 40 MB) .

Increase buffer limit

  1. Navigate away from the option, in the right hand side top you can see the Actions menu, Select Apply. It solved my problem.

Apply settings

喜爱纠缠 2024-10-24 05:46:53

如果不允许您在服务器级别更改缓冲区限制,则需要使用 <%Response.Buffer = False%>方法。

但是,如果您仍然收到此错误并且页面上有一个大表,则罪魁祸首可能是表本身。根据设计,某些版本的 Internet Explorer 会在呈现到页面之前缓冲整个内容。因此,即使您告诉页面不要缓冲内容,表元素也可能会被缓冲并导致此错误。

一些替代解决方案可能是对表结果进行分页,但如果必须显示整个表并且它有数千行,请在表生成循环的中间添加这行代码:<% Response.Flush %>。出于速度考虑,您可能还需要考虑添加一个基本计数器,以便刷新仅每 25 或 100 行左右发生一次。

不缓冲输出的缺点:

  1. 整体页面加载速度减慢
  2. 表格和列将在内容填充时调整其宽度(表格似乎在摆动)
  3. 用户将能够在页面完全加载之前单击链接并与页面交互。因此,如果页面底部有一些 javascript,您可能希望将其移至顶部,以确保在一些移动速度较快的用户点击内容之前加载它。

有关详细信息,请参阅此知识库文章http://support.microsoft.com/kb/925764

这有帮助。

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.

南街女流氓 2024-10-24 05:46:53

太感谢了!
<%Response.Buffer = False%> 效果非常好!
我的 asp/HTML 表返回大约 2700 条记录的空白页。以下调试行有助于暴露缓冲问题:我按如下方式替换 Do While 循环,并使用我的限制数字来查看发生了什么:

Replace

Do While not rs.EOF

'etc 。 ...写入表行的代码块

rs.moveNext

Loop

with

Do While recount < 2500

if rs.EOF then recount = 2501

'etc .... 写入表行的代码块

rs.moveNext

Loop

response.write "recount = " &重新计数

提高或降低2500和2501,看看是否是缓冲区问题。对于我的记录集,我可以看到大约 2700 条记录发生了空白页返回、空白表,祝大家好运,再次感谢您解决这个问题!这是一个简单而伟大的解决方案!

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!

绝不服输 2024-10-24 05:46:53

您可以按如下方式增加限制:

  1. 停止 IIS。
  2. 找到文件 %WinDir%\System32\Inetsrv\Metabase.xml
  3. 修改 AspBufferingLimit 值。默认值为 4194304,约为 4 MB。
    将其更改为 20MB (20971520)。
  4. 重新启动 IIS。

You can increase the limit as follows:

  1. Stop IIS.
  2. Locate the file %WinDir%\System32\Inetsrv\Metabase.xml
  3. Modify the AspBufferingLimit value. The default value is 4194304, which is about 4 MB.
    Changing it to 20MB (20971520).
  4. Restart IIS.
反差帅 2024-10-24 05:46:53

对同一错误消息的另一个答案(这刚刚解决了我的问题)是系统驱动器磁盘空间不足。意味着大约 700kb 是免费的。在这台非常旧的服务器上删除大量未使用的内容,然后重新启动 IIS 和网站(可能只需要 IIS),问题就消失了。

我确信其他答案对大多数人来说更有用,但为了快速修复,只需确保系统驱动器有一些可用空间即可。

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.

白昼 2024-10-24 05:46:53

我纠正了错误“ASP 0251:80004005”响应缓冲区限制,如下所示:

要增加 IIS 6 中的缓冲限制,请按照下列步骤操作:

单击“开始”,单击“运行”,键入 cmd,然后单击“确定”。
键入以下命令,然后按 Enter:
cd /d %systemdrive%\inetpub\adminscripts
键入以下命令,然后按 Enter:
cscript.exe adsutil.vbs SET w3svc/aspbufferinglimit LimitSize
注意 LimitSize 表示缓冲限制大小(以字节为单位)。例如,数字 67108864 将缓冲限制大小设置为 64 MB。
要确认缓冲区限制设置正确,请按照下列步骤操作:

单击“开始”,单击“运行”,键入 cmd,然后单击“确定”。
键入以下命令,然后按 Enter:
cd /d %systemdrive%\inetpub\adminscripts
键入以下命令,然后按 Enter:
cscript.exe adsutil.vbs GET w3svc/aspbufferinglimit

引用 https://support.microsoft。 com/en-us/kb/944886

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

执笏见 2024-10-24 05:46:53

如果你正在寻找原因并且不想与系统设置作斗争,这是我遇到的两种主要情况:

  1. 你可能会遇到无限循环,而没有 nextrecordest.movenext
  2. 你的文本数据很大但你认为不是!出现这种情况的常见原因是直接将 Microsoft Word 中的图像复制粘贴到编辑器中,因此服务器会将图像转换为数据对象并将其保存在文本字段中。这样很容易占用数据库资源,导致再次调用数据时出现缓冲区问题。

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.
梦里兽 2024-10-24 05:46:53

就我而言,我只是在 rs.Open 之前写了这一行 .....

Response.flush

rs.Open query, conn

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

Response.flush

rs.Open query, conn

蹲墙角沉默 2024-10-24 05:46:53

这也可能是由于 CursorTypeEnum 造成的。我的场景是初始值等于 CursorTypeEnum.adOpenStatic 3。

更改为默认值 CursorTypeEnum.adOpenForwardOnly 0 后,它恢复正常。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文