|
Rank: Newbie Groups: Member
Joined: 8/1/2007 Posts: 5
|
System.Exception: Maximum number of session reached. at EO.Pdf.Internal.lo.c.a(hi A_0) at EO.Pdf.Internal.lo.c.a(Byte[] A_0)
I am calling HtmlToPdf.ConvertUrl(url, file) in a loop to generate a list of reports.
this is a new error after upgrading to 4.0.36.2
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
This can happen when you call the converter this way. Try to add a slight time delay between the calls and see if it resolves the problem for you.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/14/2013 Posts: 45
|
Hi,
We run into the same error. We are processing close to 250'000 renditions in 4 parallel threads. The issue appears after having created 30 to 40 renditions.
Sorry to say so, but "This can happen when you call the converter this way. Try to add a slight time delay between the calls and see if it resolves the problem for you." is not really an answer.
Question one: What does "when you call the converter this way" mean. What other options should be there? Question two: How much should such a "delay" be and how does it relates to parallelity? I thought that by setting the MaximumParallelConversion option and not exceeding it, everything should be fine? Why do you need that and are not able to synchronize internally until resources are available? Addind a delay is a shaky way of solving a parallelity issue in a production system.
Note: We set MaximumParallelConversion to 8 (we have 4 threads) and use the HtmlToPdf.ConvertHtml option (not ConvertUrl).
|
|
Rank: Advanced Member Groups: Member
Joined: 5/14/2013 Posts: 45
|
P.S. We use the newest build from EO, not 4.0.36.2
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi Simon,
The original reply doesn't apply to the current version. In the original reply "call the converter this way" means calling it a loop, which was a bug on our side and I believe it has already been fixed.
Your understanding about MaxConcurrentTaskCount and thread is correct. However it appears that you have some kind of wrapper around our code (as you call it MaximumParallelConversion instead of MaxConcurrentTaskCount). So you may want to try to reproduce the problem in a separate test project without any of your additional code. If the problem still happens, you can send the project to us and we will be happy to investigate further.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/14/2013 Posts: 45
|
Hi,
it's quite interesting: Actually the exception is thrown and catched insided the EO.PDF library. It does not throw in our code. It seems to me, that although it throws internally the rendition created is actually fine. I just 'see' the Exception if I ran in debug mode and have Exceptions break the code in VS 2012.
I'll need to investigate further if the renditions are truly fine or whether something is missing on the page. No more investigation needed here from your side. If I find out something additional, I'll post it.
Best regards,
Simon
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
That's normal. We do throw that exception repeatedly internally and we properly handle it. It does not indicate any problem.
Thanks!
|
|