Welcome Guest Search | Active Topics | Sign In | Register

MVCToPDF.RenderAsPDF Very Slow Options
NSP IT
Posted: Wednesday, June 15, 2016 3:21:21 PM
Rank: Newbie
Groups: Member

Joined: 4/16/2012
Posts: 5
I uprading to the the latest version (EO.Total 2016.1.17.0) to get TLS 1.2 support. I have followed the implementation as described in the
Using MVCToPDF.

I have it successfully converting to a PDF, but it takes 2 to 3 minutes to do so!

I have tried setting the EO.Pdf.HtmlToPdf.Options.MaxLoadWaitTime to 5, 100, 1000, 5000, 10000, as suggested is some other posts, but I think that relates to the HTMLtoPDF version only and not MVC. It just broke the code and would never convert to PDF.

Any ideas?



eo_support
Posted: Wednesday, June 15, 2016 3:32:21 PM
Rank: Administration
Groups: Administration

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

This usually has to do with your server's DNS setting. See here for more details:

http://www.essentialobjects.com/doc/web/aspxtopdf/troubleshoot.aspx

Thanks!
NSP IT
Posted: Wednesday, June 15, 2016 3:53:57 PM
Rank: Newbie
Groups: Member

Joined: 4/16/2012
Posts: 5
I am not sure that is our issue. The PDF does download/convert, it just takes 2-3 minutes to complete the download. The machine can access the DNS/URL, but why so long?
eo_support
Posted: Thursday, June 16, 2016 10:12:56 AM
Rank: Administration
Groups: Administration

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

Based on our experience over 95% of the case is DNS issue. So please try that first. When you run your test, make sure you access the Url from within the web server itself, not the client machine that you use to trigger the conversion.

Thanks!
NSP IT
Posted: Thursday, June 16, 2016 11:30:30 AM
Rank: Newbie
Groups: Member

Joined: 4/16/2012
Posts: 5
I have confirmed that the page to be converted to PDF can be accessed directly on the server (remoted in), and does so very quickly (milliseconds).

However, the MVCToPDF still takes around 2 minutes to convert the page to PDF.

To be clear, the page is accessible on the server. It is not DNS, right? The server can access the page. The PDF does eventually get created, it just take 2+ minutes to do so. Please help!

eo_support
Posted: Thursday, June 16, 2016 12:41:32 PM
Rank: Administration
Groups: Administration

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

Can you try a blank page with no dependency resources (JavaScript, CSS and images) and see if you see time delays? Also can you trace Request.Url in your code and see if this Url matches the Url that you use to access the page from within the server?

Thanks!
NSP IT
Posted: Thursday, June 16, 2016 5:07:36 PM
Rank: Newbie
Groups: Member

Joined: 4/16/2012
Posts: 5
I have now created and tested with a blank page with no dependency resources. There was no unreasonable time delay. The Request.Url does also match.

What does that now mean? The page that takes a long time to load does have dependency resources (CSS, JS, image), but is not extremely heavy. What can be done to resolve the delay?
eo_support
Posted: Thursday, June 16, 2016 9:51:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
That means the dependency resources can not be loaded (usually not reachable because of DNS/routing issues). Try to load any of those resources directly from a browser from within your server. You should see the same timeout issue. The conversion timeout issue will go away once you fix that.
NSP IT
Posted: Friday, June 17, 2016 10:57:40 AM
Rank: Newbie
Groups: Member

Joined: 4/16/2012
Posts: 5
I really appreciate the help, but I think I am not communicating something clearly enough.

The page DOES eventually convert to PDF, with all the expected dependency resources (CSS, JS, Images). The page loads directly (not via PDF) very fast. It just takes 2+ minutes to convert to PDF.

I have also remoted into the server and accessed the page to be converted to PDF and it to loads there within milliseconds as well.

The fact that it does eventually (after 2+ minutes) convert to PDF correctly indicates that the server can reach it, true? So, it is not a DNS/routing issue, true?
eo_support
Posted: Friday, June 17, 2016 5:12:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
In that case it may be a session lock issue. Do you have any embedded resource that relies on session data such as dynamically generated images?


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.