23
Views
6
Comments
Solved
[Html2PdfConverter] Timers on HtmlToPdfConverter
html2pdfconverter
Web icon
Forge asset by Guilherme Pereira
Application Type
Traditional Web
Platform Version
11.30.0 (Build 43791)

Hello support,

I would like to know the functionality of each timers defined in HtmlToPdfConverter.

In our environment, the first timer in the below is not scheduled . Is it recommended to schedule and what it does if it is scheduled.

Timer_EmergencyKillAll
Timer_CleanUpProcessesimer_CleanUp
Timer_InitBinaries


Thanks,

Aravindkumar A

2024-01-05 18-00-17
Carlos Freitas
Solution

Hi Aravindkumar,


In my opinion the timers Timer_EmergencyKillAll and Timer_CleanUpProcessesimer_CleanUp only need to be executed, if in your environment, you are having problems on the running process being  executing for a very long time or just "stuck". Only use them as a handbrake to force the processes to stop, in case of issues.


Details based on the code:

Timer_EmergencyKillAll

Timer to kill all html to pdf running processes. By default it doesn't have the schedule configure.


Timer_CleanUpProcessesimer_CleanUp

Timer to clean up long running process and not responding processes. By default it doesn't have the schedule configure.


Timer_InitBinaries 

Timer that writes the binaries to the filesystem when it runs. By default it runs when the module is published. 

On the InitBinaries action there is a comment "After the security update on the cloud (Sep 2017)
the binaries now should reside in a temporary folder that may be periodically cleared hence the need to verify every single time"

Basically I don't think you need to worry about this timer.


Best Regards,

Carlos Freitas

UserImage.jpg
Aravindkumar Annamalai

Hello Carlos, Thanks for your detailed explanation on each timer.

At recent times, we are experiencing lot of Faulting process(wkhtmltopdf.exe)with this component which caused lot of zombie process associated in it.
Due to the fact, the FE server which has Timer enabled throwing some error(below) while access any webpages.

As a workaround, we restart the whole server and after restarting, the error stopped coming.
Again the same issue  repeats after  few days.

Upon checking with support, they claimed that  the accumulation of zombie process associated with the Html2PdfConverter component caused this error and also stated that  restarting the server also killed all processes running in the server.

Is there any permanent solution for this issue.This occurs on the FE server which has timer running.

External component has thrown an exception.

   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile,
Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Thanks,
Aravindkumar A

2024-01-05 18-00-17
Carlos Freitas

Would probably be interesting to search in the FE event log and try to find what is causing the issue. Meanwhile, as a workaround, I'd suggest to schedul, once or twice per day, the timer Timer_CleanUpProcessesimer_CleanUp, that by default kills processing running for more than 5 minutes (can be configured for a different time period using site property MaxAgeLongRunningProcesses)

Best regards,

Carlos Freitas

UserImage.jpg
Aravindkumar Annamalai

Hi, Thanks for your quick response.

The parameter is defined for 5minutes and the timer is scheduled to run in  of every 30mins interval.

Thanks,
Aravindkumar A

2024-01-05 18-00-17
Carlos Freitas

Just to confirm, you also have the Site.EnableCleanupTimer = true ?


UserImage.jpg
Aravindkumar Annamalai

Hi Carlos, 

yes, it is enabled and set to true.

Thanks,

Aravindkumar A

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.