|
Rank: Newbie Groups: Member
Joined: 9/23/2019 Posts: 7
|
From time to time we get random errors regarding the ConvertHtml method. After we updated to the current latest version 19.2.69 the errors seemed to disappear but we still get warnings (retries). The warnings are numerous so we would like to get rid / reduce them as much as possible. Trace -->
Error while processing message ---> EO.Internal.i3+e: Child process not ready. at EO.Internal.i3.a(Exception A_0, Boolean A_1) at EO.Internal.i3.a(o1 A_0) at EO.Internal.i3.a(Boolean& A_0, axv[] A_1, String A_2, String A_3) at EO.Internal.i3.a(axv[] A_0, String A_1, String A_2) at EO.Internal.at6.b() at EO.Internal.pf.a(Action A_0) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.Internal.ru.b() at EO.Internal.mw.a(ru& A_0) at EO.Internal.aj9.a(at A_0, ru& A_1) at EO.Internal.ob.e() at EO.Internal.ob..ctor(at A_0, HtmlToPdfOptions A_1) at EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, HtmlToPdfSession A_1) at EO.Pdf.HtmlToPdf.d.a() at EO.Internal.aj9.a[a](aox A_0) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
and this is how we use the method -->
private HtmlToPdfResult RenderPdfDocument() { SizeF pageSize = this.GetPageSize(); var headerHeight = PageSizes.DetermineHeaderHeight(1); var contentArea = new RectangleF( PageSizes.LeftRightMargin, PageSizes.TopMargin + headerHeight, pageSize.Width - (2 * PageSizes.LeftRightMargin), pageSize.Height - (PageSizes.TopMargin + headerHeight + PageSizes.BottomMargin));
string htmlDocument = this.HtmlBodyToDocument();
var conversionResult = HtmlToPdf.ConvertHtml(htmlDocument, this.pdf, HtmlRenderOptions(pageSize, contentArea));
return conversionResult; }
private static HtmlToPdfOptions HtmlRenderOptions(SizeF pageSize, RectangleF contentArea) { return new HtmlToPdfOptions() { PageSize = pageSize, OutputArea = contentArea, AutoBookmark = true, NoScript = true }; }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
Your code looks fine. What kind of warning/retries message do you get? Is that something from your code or from our code?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/23/2019 Posts: 7
|
I think it is from your side since it says --> "EO.Internal.i3+e: Child process not ready."
Forgot to mention that our application works on "appservices" uses webjobs.
The basic scenario is: 1. you click a button 2. you generate some data 3. when you call the ConvertHtml method it randomly crashes and we can not generate the html document.....
Not all the clients have this problem.. which makes it even more annoying.
Can you please give this one a high priority?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
This could be a over load issue. My confusion is in your original post you stated, there was this error, but then after updating to 19.2.69 the error disappeared, but still gets a waring, so it seems that you have two different issues: an error and a warning, the error went away but the warning didn't. So while the error is "Child process not ready", what is the warning?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/23/2019 Posts: 7
|
Yes, sorry for the bad explanation.. let me try again! In our application we have a mechanism that whenever an exception is thrown we retry the entire process (in our logs this will end up as a warning message). If the functionality is retried 5 times, it will be classified as an error message in our logs.
"This could be a over load issue. My confusion is in your original post you stated, there was this error, but then after updating to 19.2.69 the error disappeared, but still gets a waring, so it seems that you have two different issues: an error and a warning, the error went away but the warning didn't. So while the error is "Child process not ready", what is the warning?" --> if you do not understand what i wrote in the first 2 sentences i will summarize here --> our logs can be of type warning or error but in the end the cause is the same -> HtmlToPdf.ConvertHtml keeps on failing randomly!
So before we updated to your last version, the method HtmlToPdf.ConvertHtml would always fail (resulting in a lot of error messages on our logs).
After we updated to your latest version, the method HtmlToPdf.ConvertHtml still fails but not as often (in average after 1-2 retries (that are made automatically by our mechanism) it succeeds). This is still very bad because it takes a very long time to generate a pdf document when it fails (because of the retry that is necessary) and our customers are not happy about it.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, EO.Pdf needs to dynamically create child process at runtime to run the browser engine and also render pages from different domains in different process (due to Chromium browser engine's process isolation model). The problem you are seeing is due to the fact that it is not able to finish initializing the child process in time. This is not normal in a typical environment because the default wait time is 3 minutes. There are a number of possible causes: 1. The system is severely overloaded; 2. You have third party security software that performs extensive scans when the new process is started thus delaying the launch; 3. The disk drive on which our DLL files reside are extremely slow (such as are on a network drive) thus causing it is very slow to load them; In the latest build we performed additional retries inside our DLLs so it appears to reduce the change of you hitting this error, but the root of the problem should still be related to your environment. As such we would recommend you to test with a different environment and see if it helps. If that is not possible, try to enable EO worker process and see if that alleviates the problem: https://www.essentialobjects.com/doc/common/eowp.aspxHope this helps. Please let us know how it goes. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 9/23/2019 Posts: 7
|
Our application works on webjobs.. should it be any problem because of it? From what i see on this post --> https://www.essentialobjects.com/forum/postst10188_EOPDF-Azure-WebJob.aspx there seems to be one.
|
|
Rank: Newbie Groups: Member
Joined: 9/23/2019 Posts: 7
|
So.. regarding the post from 3:17:46, is there any way that your product can work with our application? (a WebJob).
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
We have tested EO.Pdf in WebJobs and it works fine. So WebJob does not appear to be the problem.
Thanks!
|
|