简体   繁体   中英

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. 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. 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 ). 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. I don't see any settings that allow me to change the available memory, nor has google thrown up anything useful. 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.

In my case, using Response.TransmitFile instead worked; (maybe) because it

Writes the specified file directly to an HTTP response output stream, without buffering it in memory .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM