Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Congrid
Contributor III
Contributor III

Can we set a task timeout value in Qlik Nprinting?

We are having an issue where some task get hanged for days and after many such tasks accumulate over few days new tasks that start execution go into queued state. Even after we abort the hanged task they do not get aborted until NPrinting services are restarted. 

So we want to avoid this issue by terminating any task that is running for more that 12 hours. We have similar option in Qlik Sense but I don't see anything like that in Qlik NPrinting. 

Is there any global setting we can do to set this timeout?

Qlik NPrinting 

Labels (2)
11 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, I can see 2 things here:

  1. being a band-aid - setting timeout on NPrinting task
  2. actual NPrinting tasks running for too long

I deal with timeout by using NPrinting API as this can be fully controlled and designed according to your needs. You can trigger task via API then you can measure how much time task takes and if  it takes longer than required time you can abort it. For that you can use following endpoints:

So thats that regarding timeout for a task.

 

I would however first investigate why do your taks take so much time and would try to improve design, concept as well as Qlik Sense source apps so your tasks could be generated on time. That also would require hardware and environment check. 

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Congrid
Contributor III
Contributor III
Author

Hi Lech,

 

Thanks for your reply.

Just to give you a background, we host a shared qlik sense and Qlik Nprinting platform where different teams work on. We do not control the development of the reports. For this long running task issue we have already reached out to the team to check and fix it. 

Our concern is we as admins want to put some failsafe at our end so such issues do not occur again. 

So the option of API is not possible was us as the development teams setup the triggers themselves on Nprinting under publish tasks

Please let me know if there is any global config level setting we can do for the task timeout.

 

Regards,

Congrid Borges 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

There are settings in:

C:\Program Files\NPrintingServer\NPrinting\Scheduler\scheduler.config file

Lech_Miszkiewicz_0-1645012184319.png

 

I suggest to take a backup before making any changes to this file and I think restart of services is required for changes to be applied

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Congrid
Contributor III
Contributor III
Author

Thank you Lech. 

Let me try this setting. 

Congrid
Contributor III
Contributor III
Author

Hi Lech,

Changing these settings done seem to work. 

I added the below tag in the scheduler.config file but task still keeps on running after 5 minutes.

<add key="report-timeout-minutes" value="5" />

Anything else I should update?

 

Regards,

Congrid

David_Friend
Support
Support

@Congrid that setting typically does it, keep in mind its a global timeout, how far past 5 minutes are tasks running?

Did you restart your server ?

David_Friend
Support
Support

@Congrid  any update on this?

Congrid
Contributor III
Contributor III
Author

Hi David,

 

No, that setting did not work.

I found comment by @Frank_S  who mentions 

*The primary intention of these settings therefore is not to cause a 'fail' or 'abort' of any NPrinting executions but to allow valid, long running execution to complete.*

 

So I do not think this will work.

This is the post.

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-Default-Report-Timeout/td-p/19133...

 

Let me know if you have any other suggestions.

-Congrid

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Other option would be to use API to monitor task status and run time allowing for tasks reaching threshold to be aborted.

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.