[英]IIS7 “Not enough storage is available to process this command” intermittent error in HTTPHandler
So, I have a web site that serves videos via a HTTP handler, which is our security layer. 因此,我有一个网站,该网站通过HTTP处理程序提供视频,这是我们的安全层。 Some clients have reported that the videos are not working intermittently.
一些客户报告说这些视频不是间歇性的。 I was finally able to reproduce the issue, and our logging coded reports success in validating the user, then the line:
我终于能够重现该问题,并且我们的日志记录代码报告成功验证了用户,然后显示以下行:
Response.WriteFile(filename); // Where this is the path to a video of about 32 MB
throws the above exception. 引发以上异常。 I found the actual error by viewing the request and response with Fiddler.
我通过用Fiddler查看请求和响应找到了实际错误。 But the server has 2 GB of memory free, and the videos started working again an hour or so later ( which probably equates to less people using the server, but nothing was changed on it ).
但是服务器有2 GB的可用内存,并且视频在一个小时左右后又重新开始工作(这可能意味着使用服务器的人数减少了,但没有任何变化)。 We run two websites on this machine, and the other never has issues like this, but it also doesn't use a layer like this where .NET code is responsible for writing the file.
我们在这台机器上运行两个网站,另一个从来没有类似的问题,但是它也没有使用.NET代码负责编写文件的类似层。 I don't see any settings that allow me to change the available memory, nor has google thrown up anything useful.
我没有看到任何可以更改可用内存的设置,也没有Google抛出任何有用的信息。 Any suggestions appreciated.
任何建议表示赞赏。
I should add, I stopped and started and then restarted my site, I've had issues that are solved in the short term by doing this in the past. 我应该添加,停止并启动然后重新启动我的网站,过去我在短期内遇到了一些问题可以解决。 This did not help.
这没有帮助。
I just ran into this problem trying to Response.WriteFile
a ~170 MB pdf. 我只是在尝试
Response.WriteFile
约170 MB pdf时遇到了这个问题。
In my case, using Response.TransmitFile
instead worked; 就我而言,使用
Response.TransmitFile
反而有效; (maybe) because it (也许)因为
Writes the specified file directly to an HTTP response output stream, without buffering it in memory .
将指定文件直接写入HTTP响应输出流, 而无需将其缓冲在memory中 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.