Exception: 'System.OutOfMemoryException'

Hi,


when I try to visualize a big document file (PDF size: 500MB), the viewer throws an exception (see attach file).

The document that we are trying to visualize is from one of our clients, so we have to ask them if we can share that document (so you can test with it).

Thanks.

Hello Alexis,

We are sorry to hear that you have this issue. In order to fix it (exception while displaying very big files) you need to use 64-bit application pool in the IIS web-server.

If you will have more questions please feel free to contact us.

Hello Denis,


Thanks for your answer.

We have changed our application pool to 64-bit in IIS web-server, but when the viewer displays the document, doesn’t show the button images. See attached.

Thanks.

Hello Alexis,

We are sorry to hear that you have this issue. This is commonly known issue, it is described in the “GroupDocs Viewer for .NET FAQs

If you are using ISS Classic mode, please refer to the “Q: I have an issue with the Viewer. The problem is that I can’t see the toolbar icons (but the toolbar buttons are working properly) when I run the Viewer in my own application?” item.

If you are using ISS Integtated mode, please refer to the “Q. I have 404 error for all header buttons icons in .NET Viewer MVC project?” item.

If you will have more questions please feel free to contact us.

I am getting that exception:


The operation has timed out
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The operation has timed out

Source Error:

Line 41:
Line 42:
Line 43: <%= Viewer.ClientCode().TargetElementSelector(“#visordiv”).
Line 44: Stream(New System.Net.WebClient().OpenRead(WebVisores.VisorGroupDocs.AbrirArchivo()),
Line 45: WebVisores.VisorGroupDocs.ObtenerDocumentoConVersion(),

Source File: C:\Program Files (x86)\G.H.S.A\webimagenes64\VisorGroupDocs.aspx Line: 43

Stack Trace:

[WebException: The operation has timed out]
System.Net.WebClient.OpenRead(Uri address) +754
ASP.visorgroupdocs_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in C:\Program Files (x86)\G.H.S.A\webimagenes64\VisorGroupDocs.aspx:43
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +395
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

I have sent you via mail: original file, source code and pool configuration.

BTW: Groupdocs dll version: 2.7.0

Thank you.


The configuration is below (maybe can help to reproduce)



Hello Alexis,

We are sorry to hear that you have this issue and sorry for the delay. We’ve obtained the source code of the code-front and code-behind, target document, IIS application pool configuration and stack trace of the exception. After applying of all these materials we were not able to reproduce the issue - GroupDocs.Viewer displays the document without problems.

System.Net.WebException: The operation has timed out” exception can be caused by many reasons, but, most likely, it has occurred because opening a big document in the GroupDocs.Viewer, and it had no enough time to converts it to the HTML-form.

Here are several suggestions, which can help:
1. In the advanced settings of the application pool, which can be accessed using IIS Manager, increase the value of the “Ping maximum response time” option.
2. In the advanced settings of the web-site, which can be accessed using IIS Manager, increase the value of the “Connection timeout” option.
3. In the web.config, add the executionTimeout="" key-value pair to the “configuration -> system.web -> httpRuntime” node.

Also please clarify several other things, which can help to solve the issue or at least narrow a set of possible reasons:
1. This “The operation has timed out” exception occurs only with the “0_CARPETA LEGAL_20141218_113946.pdf” document, or with some others?
2. With the “0_CARPETA LEGAL_20141218_113946.pdf” document, the exception occurs every time, when you try to open it, or it occurs sporadically, occasionally?
3. Does the occurrence of the exception depends on the presence or absence of the document cache?
4. You have said that you are using distributed server configuration with two machines. Can you reproduce this issue in the single-machine development environment? In other words, is the “The operation has timed out” exception dependent from specific distributed configuration?

Thanks and waiting for the reply.

Hello Denis, thanks for your suggestions, we are going to try it.


About your questions:
  1. Occurs with big documents ( > 40 mb)
  2. Every time.
  3. With presence of document cache do you mean the AOT caching? If so, the answer is no. The cache is generated by default (every time the document is opened)
  4. Yes, it happends in a distributed configuration (in same environment a single configuration doesn’t happends that exception). But we try to reproduce that issue in our development environment with the distributed configuration (like you) and we were not able to reproduce the exception.
I will notify you if I got news about your tips.

Thank you.

Hello Alexis,

Thank you for answering. However our developer need more detailed info about your distributed server configuration. Because you’ve said that this exception occurs only in distributed configuration, but not in the single-machine configuration, we suppose that this fact is the key. Thank you for the schema, but it is not very clear for us, so, please, describe it in more detail.

Thanks.