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

EO PDF MVC Initial engine load time Options
Ashish
Posted: Tuesday, January 8, 2019 2:18:32 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2018
Posts: 2
Hi Team,

We have created ASP..NET MVC application that server PDF on Fly using EP PDF MVC 2017 package. It works fine and it is very easy to use.

[EO.Pdf.Mvc.RenderAsPDF(AutoConvert = false)]
public ActionResult GetPDF(string pdfString)
{

Just we have some memory issue that is described below.

We are getting concurrent request for on the fly PDF. Now the issue is, EO PDF is initializing lot of host processes(40 to 50 Rundll32 ) to serve these concurrent request. Primary factor of this issue is initial load of 4 to 5 seconds to start EO PDF MVC engine.
EO PDF MVC engine checks if their is any engine available to serve the request . If not then it initialize the another engine. So even though i require max 2 to 3 engines to server all PDF request,then also EO PDF creates around 8 to 10 engines that is consuming 3GB of RAM. Also these EO PDF MVC engine gets dropped from memory after 10 mins of idle time. So this engine load again if application get PDF request post 10 mins of idle time.

As a temporary solution we have limit the incoming request to five and rest request queued until engine is up and running and free.

From EO PDF side , we just want to know if their is any solution for this issue. Is it possible to keep 2 to 3 engines always in memory or any other way. Please advice.

Many Thanks
Ashish



eo_support
Posted: Tuesday, January 8, 2019 12:59:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,094
Hi,

This is normal and a large number of child process does not mean a large amount of memory being used because all child processes in fact share certain memory blocks together. You can find more explanation in the last post in this thread:

https://www.essentialobjects.com/forum/postst8270p2_RunDLL32-and-Memory-Footprint-of-EOWebBrowser.aspx#43275

If you still wish to restrict number of engine instances used by the PDF converter, you can set this property:

https://www.essentialobjects.com/doc/eo.pdf.htmltopdf.maxconcurrenttaskcount.aspx

This will restrict number of concurrent task thus restrict number of active engines. If you try to have more concurrent task than allowed, then the conversion will fail with an exception.

Thanks
Ashish
Posted: Wednesday, January 9, 2019 1:19:23 AM
Rank: Newbie
Groups: Member

Joined: 10/16/2018
Posts: 2
Thanks for answer,
Couple of questions
1) Is it possible to keep two to three engines in memory permanently.
2) Currently Engines are dropping automatically after 10 minutes of ideal time. Can this be increase to probably 24 hours?
3) Is there a way to create engine dynamically from code. Currently it is initializing only when MVC application gets request.
4) Is there a way to dynamically drop the engines from memory in MVC application. We are using EO PDF MVC 2017.

Many Thanks
eo_support
Posted: Wednesday, January 9, 2019 12:23:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,094
Hi,

No. The engine pool are internally maintained automatically and there is no public interface for you to control the behavior. The only property that can affect the engine pool size is MaxConcurrentTaskCount previously mentioned. If you wish to keep the engine alive, you can use a timer to call ConvertHtml(string.Empty) periodically and that will reset the internal idle timer.

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.