Welcome Guest Search | Active Topics | Sign In | Register

Windows service memory issue Options
Daba
Posted: Wednesday, December 12, 2018 10:04:39 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2018
Posts: 5
Hi.

We have a running windows service to generate pdfs.
It appears the service have a memory leak, as after running for about 0.5-1 day it consumes over 2GB of memory.
When running the service through a memory profiler it appears EO.internal is hoarding massive amounts of memory.
Perhaps you can shed some light on what the objects in EO.internal represent and how to dispose them?

Below is a picture showing the profile with object names, after running a local version for about an hour.



eo_support
Posted: Wednesday, December 12, 2018 12:56:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

Please try the latest build and see if it resolves the issue for you. We have fixed a number of issues that can cause memory leaks in the past. So the issue may have already been resolved.

If you continue to have problem with the latest build, please try to isolate the problem into a small test application and then send the test application to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Once we receive the test project, we will be happy to investigate further.

Thanks!
Daba
Posted: Monday, December 17, 2018 9:38:19 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2018
Posts: 5
Hi, thanks for the response.
I've tried out the latest build trial version and it seems to resolve the memory issue. However, after upgrading we frequently encounter a new error:

System.Exception: This WebView either has already been destroyed or is being destroyed.
at EO.Base.Runtime.a(Object A_0, Exception A_1, Boolean A_2)
at EO.WebBrowser.WebView.s()
at EO.WebBrowser.WebView.LoadHtml(String html, String baseUrl)
at EO.Internal.pa.a(adl A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, String A_6, Boolean A_7)
at EO.Pdf.HtmlToPdfSession.a(adl A_0, String A_1, String A_2, Int32 A_3, Int32 A_4, String A_5, Boolean A_6)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
...


Our code at point of failing:

Code: C#
using (var ms = new System.IO.MemoryStream())
            {
                //Runtime.AddLicense(Configuration.EoPdfLicense);

                var pdf = new PdfDocument();
                HtmlToPdf.ConvertHtml(_templateHtml, pdf, _pdfOptions);

                pdf.Document.Save(ms);

                return ms.ToArray();
            }


EO.WebBrowser was not a part of EO.pdf 15.4 which we were using previously. Is there perhaps some configuration required after updating?
If we rollback to 15.4 the same pdfs are created without errors.
It's not clear to me why the html webView would be destroyed. Any information to shed light on why it's failing is appreciated.

Thanks.
eo_support
Posted: Monday, December 17, 2018 11:03:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

This is still an issue that we are chasing. There are various cause for this issue. The most common reason is there is something in your HTML that triggered a browser engine crash. In that case we will need a repro in order to get to the bottom of this. So if you can isolate it please send it to us and we will look into it as soon as possible. We may not be able to completely fix this problem but usually as soon as we can reproduce it, we will be able to find out what triggered it and maybe at least we can find what to avoid in order to prevent this problem.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.