|
Rank: Advanced Member Groups: Member
Joined: 11/8/2017 Posts: 66
|
Hello, we are running EO-PDF (latest - v22.0.30) from a .NET-Core 3.1 web application. We are deploying to App-Services. When we request a report we are generally generating two PDF's (one is a coversheet [which is one page] while the other is a report [which could be 1 page or could be say 100 pages]). We are constantly getting timeouts as follows:-
System.Exception: Time out expired before the page can be loaded. at EO.Internal.evhy.mroh(evcw bsj, String bsk, String bsl, Int32 bsm, Int32 bsn, String bso, Boolean bsp) at EO.Internal.evhy.moky(evcw bsb, String bsc, HtmlToPdfOptions bsd, String bse, Int32 bsf, Int32 bsg, String bsh, Boolean bsi) at EO.Pdf.HtmlToPdfSession.moky(evcw yw, String yx, String yy, Int32 yz, Int32 za, String zb, Boolean zc) at EO.Pdf.HtmlToPdfSession.moky(evcw zd, String ze, String zf, Boolean zg) at EO.Pdf.HtmlToPdfSession.LoadHtml(String html) at EO.Pdf.HtmlToPdf.fglk.kmeo() at EO.Internal.evhv.pwlu[a](lidr`1 bri) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream) at MI.ParentReporting.Web.PdfGenerate.NetCore.Controllers.PdfGenerateController.GeneratedPdf(UploadData uploadData, Int32& pageCount, HtmlToPdfResult& coversheetHtmlToPdfResult, Byte[]& coversheetPdf, Boolean generateFromCoversheetHtml) in C:\Projects\Api\MI.ParentReporting.Web.PdfGenerate.NetCore\Controllers\PdfGenerateController.cs:line 649 at MI.ParentReporting.Web.PdfGenerate.NetCore.Controllers.PdfGenerateController.Post(UploadData uploadData) in C:\Projects\Api\MI.ParentReporting.Web.PdfGenerate.NetCore\Controllers\PdfGenerateController.cs:line 108
The problem seems to be that we are generating two reports one immediately after the other (sequentially). I have noticed if I breakpoint after the first is generated, wait a short time then continue, both reports are generated successfully
Note that we were not getting this issue with previous versions
I have created an Azure memory dump and sent it to your private email address - with the timeouts occurring when generating PDF one after the other, I wondered if there were deadlocks occurring
Can you help ?
|
|
Rank: Newbie Groups: Member
Joined: 2/23/2022 Posts: 9
|
We are currently testing an update to 21.3.18.0 from 20.0.81 and we are having this same problem. In our situation, we generate a multipage PDF from HTML source, then loop through the pages and overlay a header and footer onto each page. The distilled code which will reproduce this issue is:
Dim doc As PdfDocument Dim opt As HtmlToPdfOptions Dim body, header, footer As String
body = IO.File.ReadAllText("c:\temp\body.html") header = IO.File.ReadAllText("c:\temp\header.html") footer = IO.File.ReadAllText("c:\temp\footer.html")
Runtime.AddLicense(*KEY*)
doc = New PdfDocument HtmlToPdf.ConvertHtml(body, doc)
For i As Integer = 0 To doc.Pages.Count - 1 opt = New HtmlToPdfOptions With {.OutputArea = New RectangleF(0.5, 0.25, 8, 9.5), .MaxLoadWaitTime = 5000} HtmlToPdf.ConvertHtml(header, doc.Pages(i), opt)
opt = New HtmlToPdfOptions With {.OutputArea = New RectangleF(0.5, 9.9, 8, 1.1), .MaxLoadWaitTime = 5000} HtmlToPdf.ConvertHtml(footer, doc.Pages(i), opt)
Next
doc.Save("c:\temp\out.pdf")
Not only does calling ConvertHTML in quick succession sometimes generate a timeout error, but sometimes when it doesn't, it simply renders nothing, leaving us a page with no header and/or no footer. In our development environment, we've resorted to adding thread.sleep statements to give the process time to "breathe", but this is not an acceptable solution. It is disheartening to hear the problem is in the most recent version of eo.pdf as well.
I will watch and wait for any response.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi David,
We have sent a new build to your through private message. Please use that build instead.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/23/2022 Posts: 9
|
Thank you for the quick response. I have downloaded the specific version and tested it again. I ran the test manually 5 times with no timeouts, then put the code in a loop to do 10 at a time to save me some time. The first run I got a timeout error and I have not gotten one since in about 10 runs. I don't know if that one was a fluke, but I will continue to monitor this. For now, this is much better than what we had going.
Thank you again!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
David A wrote:Thank you for the quick response. I have downloaded the specific version and tested it again. I ran the test manually 5 times with no timeouts, then put the code in a loop to do 10 at a time to save me some time. The first run I got a timeout error and I have not gotten one since in about 10 runs. I don't know if that one was a fluke, but I will continue to monitor this. For now, this is much better than what we had going.
Thank you again! Great. Please keep us updated.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
To Phil,
We have sent a new build to you through private message. Please let us know if the new build resolves the issue for you.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/23/2022 Posts: 9
|
eo_support wrote:David A wrote:Thank you for the quick response. I have downloaded the specific version and tested it again. I ran the test manually 5 times with no timeouts, then put the code in a loop to do 10 at a time to save me some time. The first run I got a timeout error and I have not gotten one since in about 10 runs. I don't know if that one was a fluke, but I will continue to monitor this. For now, this is much better than what we had going.
Thank you again! Great. Please keep us updated. Sorry it's taken a little while, but we are advancing this DLL version to production. We haven't had any reported problems with timeouts.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Great. Thanks for the update! Please feel free to let us know if you run into any other issues.
|
|