Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Occasional failure of PDF: Conversion failed. error code = 8. Parameter is not valid. Options
Johnathan
Posted: Tuesday, June 13, 2017 9:43:05 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 11
Hi

We have been using eo.pdf for about 4-5 years without any issues.

Recently we have been experiencing a number of repeating failures which seem only resolved after recycling the application pool of IIS in which the PDF app is running.

Our customers create PDFs throughout the day via the "webpage to PDF" conversion.

We started to receive errors about every 2 days when the pdf functionality would fail on every build and stay failed until the app was manually restarted. No other part if the app seemed affected.

The stack traces look like this
Message: Conversion failed. Conversion failed. error code = 8. Parameter is not valid.
Stack trace: at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Internal.a3e.a(af5 A_0) at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc) at KPIDash.Library.kpiDashboard.GenerateReport(HttpContext context, kpiUser loggedinUser, String FilterString) in...

After a restart all seems OK and every PDF builds just fine. We then changed our IIS settings to recycle the apppool every 8 hours (was 24hrs) and this seems to have reduced the problem to once per week. It still occurs and when it does all PDFs fail with "Conversion failed. error code = 8. Parameter is not valid." until a restart.

To my knowledge we have made no code changes in this area of our system for around 4 years
2 weeks ago we upgraded to the very latest version downloaded from your website.

Any ideas????

Thanks

Johnathan
eo_support
Posted: Tuesday, June 13, 2017 4:26:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hello,

This particular error occurs when the conversion engine tries to render PDF page images (when HtmlToPdfOptions.GeneratePageImages are set to true) and for some reason the .NET side will not accept this image (due to "Parameter is not valid"). We will change our code to provide inner exception information to you on this error in our next build so that when you use the new build you will get more detailed information on this error. In the mean time, if you can duplicate this error please share with us so that we can find out exactly what caused this.

Having to restart when this error occurs is another issue. We will try to duplicate that here and see if we can fix it as soon as possible.

Thanks!
Johnathan
Posted: Friday, June 16, 2017 6:34:21 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 11
Unfortunately we cant replicate this error. It seems to occur occasionally and then this is for every document PDFed until the app is restarted.

Please keep me posted on any changes that might help.
eo_support
Posted: Friday, June 16, 2017 9:04:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hi,

We have made changes on our end so that when you receive this error again, the exceptions' InnerException will contain more information about why it fails. This change will be in our next build.

However we have not been able to reproduce the other issue: having to restart the app in order to convert again. What happens if you try to convert again without restarting after you hit this error?

Thanks!
Johnathan
Posted: Friday, June 23, 2017 4:49:40 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 11
eo_support wrote:
Hi,

We have made changes on our end so that when you receive this error again, the exceptions' InnerException will contain more information about why it fails. This change will be in our next build.

However we have not been able to reproduce the other issue: having to restart the app in order to convert again. What happens if you try to convert again without restarting after you hit this error?

Thanks!



Sorry for the late reply I did not notice your post.

We have not experience the "restart problem" for about 3 weeks now since setting our app to recycle every 6 hours. We could experiment with increasing this again.


We are however experiencing a number of other failures. Our code is mainly unchanged for many years so these failures are confusing us.
For example
We are seeing this exception randomly every couple of days.

Can not create additional conversion task. All engines are busy.,
Stack Trace: at EO.Internal.alx.a(ax A_0, sq& A_1) at EO.Internal.o9..ctor(ax A_0, HtmlToPdfOptions A_1) at EO.Pdf.HtmlToPdfSession.a(HtmlToPdfOptions A_0) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions A_0, Boolean A_1) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc) at


Or this 2-3 times per week.

Conversion failed. Browser engine failed to render page. Failed on command 1,
Stack Trace: at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Internal.a3e.a(af5 A_0) at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc) at KPIDash.Library.kpiDashboard.savePDFtoFile(HttpContext context, Guid userid, DateTime nowdate, String filterstring, Boolean landscape, String filename, Int32 _reportType)


In both cases the PDF is created in a separate thread.
In most cases triggering the same PDF again will normally build it just fine, so I fairly sure it does not relate the contents of the PDF.

Where do we get the new update with the more details exceptions?

Thanks.

Johnathan
eo_support
Posted: Friday, June 23, 2017 1:02:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hi,

The first issue is caused by system overload. You can try to set HtmlToPdf.MaxConcurrentTaskCount and see if that resolves the issue for you. HtmlToPdf.MaxConcurrentTaskCount is a "circuit breaker" that will throw an exception when there are too many con-current conversion task. If you do have a powerful system you can try to increase this number so that you will not run into problems. However if your system is indeed under stress and you increase this number, you will run into other problems, such as the second problem. So the second one maybe related to the first one.

The update with more detailed information is not posted yet. It should be out late next week.

Thanks!
Johnathan
Posted: Tuesday, June 27, 2017 5:03:08 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 11
Hi

Can you tell me what the default value of HtmlToPdf.MaxConcurrentTaskCount is please, so I know what value to change it to.

Thanks

Johnathan
eo_support
Posted: Tuesday, June 27, 2017 2:36:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hi,

In the current version the default value is 25.

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.