locked
IIS out of memory exception RRS feed

  • Question

  • Hi

    in my web application i have a funcion on server pages, for zip a multiples files. If the sum of the bytes of files, is more than 120BM, the ram of the IIS processo is over 3GB and as a result, i have a "IIS out of memory exception". I have this problem when send to the client, the zip file from WCF service.

    Can anyone tell me how to solve the problem?

    Regards


    • Edited by Pengo11 Thursday, December 14, 2017 2:02 PM
    • Moved by CoolDadTx Thursday, December 14, 2017 2:56 PM WCF related
    Thursday, December 14, 2017 1:16 PM

Answers

All replies

  • Hi

    in my web application i have a funcion on server pages, for zip a multiples files. If the sum of the bytes of files, is more than 120BM, the ram of the IIS processo is over 3GB and as a result, i have a "IIS out of memory exception". I have this problem when send to the client, the zip file from WCF service.

    Can anyone tell me how to solve the problem?

    Regards

    https://blogs.msdn.microsoft.com/webapps/2012/09/06/wcf-chunking/

    you can post to the WCF forum.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

    • Marked as answer by Pengo11 Monday, December 18, 2017 3:05 PM
    Thursday, December 14, 2017 2:43 PM
  • You're probably trying to use WSHttpBinding with MTOM encoding. MTOM is a text-based encoding so you are taking a hit to conver the zip file to text. This eats up memory and has some overhead. 

    At a minimum change your encoding to Binary. Also consider whether you need the overhead of WSHttp or if Binary (or perhaps NetTcp) would be sufficient.

    Note that changing the binding is a breaking change to clients. Additionally you cannot mix bindings based upon methods. If your service contract has a mix of both "regular" calls and file downloads then you should consider breaking it up into separate interfaces. Otherwise callers will have to use a single binding for all calls even if they don't need it. If you have already released your service contract then you'll need to leave the existing binding alone. You can however add a new binding (with a modified endpoing like '/binary' and then encourage your clients to use the newer endpoint.


    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, December 14, 2017 2:56 PM