Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF - "This session is no longer valid" exception during long conversions Options
Lance
Posted: Thursday, January 2, 2014 1:37:10 PM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
Hi,

We're experiencing the following exception when a conversion takes longer than 3 minutes:

Code: C#
EO.Pdf.Internal.k5: This session is no longer valid. If you wish to reuse the session later, please consider calling GetCookies to retain the session cookies, then reuse these cookies through HtmlToPdfOptions.Cookies with another session. (5)
   at EO.Pdf.Internal.ls.l()
   at EO.Pdf.Internal.ls.a(a A_0)
   at EO.Pdf.Internal.ls.a(cj A_0)
   at EO.Pdf.HtmlToPdfSession.Dispose()
   at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options)
   at EO.Pdf.HtmlToPdf.ConvertUrl(String url, Stream stream, HtmlToPdfOptions options)


I've set the MaxLoadWaitTime value to 600000 (10 minutes) but HtmlToPdfSession object appears to have its own internal timeout? Looking at the class's properties, I don't see any way to override it. We only recently started running into this issue as we've never had a report take longer than 3 minutes to render.

I've read the "Using HtmlToPdfSession" section of the API documentation but it doesn't offer a solution as the HtmlToPdf.ConvertUrl() method internally creates and uses the HtmlToPdfSession object as specified. The session lifetime on the site being converted is also not an issue as all of the resources being converted are public (no session required).

Version: EO.Pdf 5.0.56.2 (updated this morning, 1/2/14)

Thanks
eo_support
Posted: Thursday, January 2, 2014 2:02:01 PM
Rank: Administration
Groups: Administration

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

The converter "session" is not the same as your website session. It's an internal "connection" between different modules in our code. The session timeout error may occurs occasionally due to certain situations --- for example, the converter engine runs out of memory and unexpectedly shuts down. But if you run into this problem consistently, then it can indicate a bug, or you are pushing the converter beyond its capacity. If you can PM us a test page we will try to run the test here to see if we run into the same problem. If we can see the same problem, then we can debug into it here to see what we can find.

Thanks!
Lance
Posted: Thursday, January 2, 2014 6:04:15 PM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
For anyone else who runs into this issue - it was caused by trying to convert a page which accidentally contained multiple SVG charts that were rendering 10-20M elements each. The charts also animate upon loading, so I believe it simply overwhelmed and crashed the converting engine.
eo_support
Posted: Thursday, January 2, 2014 6:41:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
I see! Thank you very much for the update!


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.