AOT Caching: Exception of type 'System.OutOfMemoryException' with big document ( > 200 mb)

We have implemented the AOT caching, but we have detected that with a big file (size 200 mb) the methods GenerateHtml and GenerateImages throws that exception.

I have sent you via email the stack trace of the exception and the file sample.

Thank you.

Hello Alexis,

Sorry for the delay, and thanks for providing us the sample document and a stack trace.

Such big files require a prepared and powerful environment. Yes, we can reproduce the same “System.OutOfMemoryException” when using development environment and trying to generate cache when web-site is running under IIS Express or ASP.NET Development Server.

But, despite of really huge size, GroupDocs.Viewer can generate a cache and can display such PDF in a browser, as you can see on the screenshot. There are two main requirements in order to do this:
1. You need to have enough memory and CPU power. For example, my machine has 4-cores Intel Core i7 and 8 GiB RAM. And these two methods
dc.GenerateImages(“Alexis/D375A-6R SM 65001 + ESP GSN0521401.pdf”, null, null, null);
dc.GenerateHtml(“Alexis/D375A-6R SM 65001 + ESP GSN0521401.pdf”, “/”, false);

required over 30 minutes. Yes, it’s a huge amount of time, but it is also a very large document. For the “D375A-6R SM 65001 + ESP GSN0521401.pdf” image-based cache takes over 500 MiB (and it is only full-sized page images), and HTML-based - almost 1 GiB.

2. Your web-site should be launched under IIS, your operating system should be 64-bit based, and application pool should work in the 64-bit mode (Application Pools → Advanced Settings → [enable32BitAppOnWin64] → False).

Hope these suggestions will be helpful.