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: 
bkukov
Partner - Contributor
Partner - Contributor

Nprinting reports generating slower after 2021 release

Hello, I am part of a team that utilizes Qlik Sense + Nprinting and we were recently doing our upgrade QA on a staging server when I noticed an odd issue. When I run a set of 14 reports that we're currently running on Nprinting 2019 version, 9 of the reports finish within 50 seconds, while the other 5 end up running for as long as you let them run. I've let this task run for 24+ hours and they never end up generating.

I ran the reports 1 by 1 and found which reports generate and which don't, and then I wanted to see if the ones that wouldn't generate in a 14 report task, would generate alone. This task of 1 report with 1 site still wouldn't generate even after hours. These reports usually take 30-50 seconds each when I run them with all of the same filters.

The Qlik Sense app does have 3rd party extensions but those are in the majority of the reports. The most luck i've had is to completely remove the 3rd party extension from the app and rebuild the tables for the missing objects but even then I get some of the non generating reports to generate after 2-3 hours at best. 

Has anyone else had this issue? We have to service thousands of clients along with tens thousands of sites, having 1 site take an hour instead of 30-50 seconds has been crippling. I've made a ticket as well but was told to make a post on the forums as well. 

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

Hi,

this is not as simple as saying that one report generates quickly and another one slower. You have to take into account following things:

  • after upgrade 
    • have you regenerated metadata for all connections?
    • have you checked all templates for entities and run them individually?
  • source Qlik Sense app for each report
    • how big it is
    • how fast it responds to selection
    • how well it is written - does it follow all best practices when it comes to building data model and writing expressions?
    • is it built to load only necessary minimum to support required NPrinting reports
      • are all unused columns dropped
      • are all unused tables dropped
      • is data limited to only required rows
    • is it supported - meaning does it use only supported objects on UI when it comes to objects used by NPrinting
  • Qlik Sense environment
    • obviously NPrinting is only generating reports but people often dont realize that heavy work needs to be done on Qlik Sense server to provide all the data required for those report. Have you observe how Qlik Sense server resources behave when you run your set of 14 reports?
    • Did you observe CPU and RAM consumption at that time- what levels does it show?
  • NPrinting report (structure and template):
    • this is another huge topic which we could discuss in separate conversation all alone, but long story short depending on following factors your report may take less or more time:
      • use of supported objects:
        • you say: some reports may use extensions
        • I say: if you use extensions you are on your own - it may work, it may not. It may hang "webrenderer" service and therefore affect other reports as well. It may be that one "bad egg" in a bunch which causes whole thing to behave unpredictably unstable.
        • My advice is: always stay away from extensions as far as possible - as a Qlik Partner I have many clients and know that extensions are a major issue creator simply because they cannot be tested with NPrinting by Qlik - hence cannot be confirmed as supported. The fact that something does not work after upgrade tells me that maybe extensions behave differently in new version and cause issues.
        • I guess first thing support will tell you to do will be to remove all extensions from all reports.. and I am backing this 100% up!
      • number of unique values in cycle (if used)
      • applied filters on task - simply to limit data on Qlik Sense side allowing for faster responding objects
      • applied filters on reports- simply to limit data on Qlik Sense side allowing for faster responding objects
      • user filters!!! - when this is used NPrinting must generate seperate version of report for every user as each of them may have different filter hence requirs different dataset
      • number pages in template (if used)
      • number of levels in template (if used)
        • this may be significant if youa re using pixel perfect reports with some detail reports based on levels
  • NPrinting server
    • Is is dedicated server only for NPrinting as required?
    • How many CPU cores you have?
    • How much ram you have?
    • how many Engines does your configuration contain?
    • have you observe resources on it when you run your set of 14 task?
      • if yes - did you notice it to use all cores/all ram at any stage?
    • schedule - do you trigger all 14 tasks at the same time or are they in cascade/dependency by using API?
  • Other considerations:
    • do all your reports come from the same QS app
    • If not - did you notice pattern in some reports taking much less an some reports taking more time?
      • if yes - it means that they are not built following best practices and room for improvement may be simply  by looking at templates and source Qlik Sense application

As you can see this is not a straight forward task. It is complex, requires patience and transparency with what we are dealing with. 

BY THE WAY - strange that Qlik support asked you to write community post 🤔

Anyway - please keep us posted how it goes as it may be a bug in the version you are running and it would be good to know how to troubleshoot it.

good luck - cheers

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.
bkukov
Partner - Contributor
Partner - Contributor
Author

Hi Lech,

I read through your post but I think that you're generalizing the problem. I am using the same app and the same reports that I was using with the 2019 version of Nprinting. On that version everything runs and everything runs rather quickly. For this example, lets say each reports runs in 30-60 seconds each, so that for 14 reports the entire task would take 7-14 minutes to execute. 

After upgrading the Nprinting to the 2021 version, 9 out of these reports still run in 30-60 seconds while the remaining 5 run for 24+ hours. I understand the complexity of Nprinting and the details involved in thread count, core count, app size, ram size, network bandwidth, etc. That's not my problem here since I'm not concerned about the OVERALL performance of Nprinting, I am concerned that the NEW version we're looking to upgrade to is malfunctioning even after considerable debugging attempts. 

I also mentioned that I had removed all of the extensions and that I had rebuilt the tables and even then the same reports would take 1+ hours to run. I understand there are best practices and we've done what we can to follow them in order to get this large scale distribution running in the first place. Again, my issue isn't with the efficiency of Nprinting overall but rather why an upgrade could possibly extend run times a thousandfold. 

bkukov
Partner - Contributor
Partner - Contributor
Author

Adding in two pictures that show the exact same task on the two servers in terms of time to generation. Disregard the "Elapsed Time" row since I aborted the task and it had not moved since 5 hours into the run. The exact same task on 2019 version took 2 minutes and 49 seconds. 

This is the root of my concern for this new version.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @bkukov 

Thanks for reply and confirmation that you have changed and removed all unsupported objects. That way Qlik support will have something to look at. 

You have given us 2 screenshots of tasks where 1 runs faster and another one runs for ages. I get it - it is strange and frustrating. Now,

  • have you checked logs from the task which runs so long?
  • I would normally check all NPrinting logs + windows events to see if there are any issues there?
  • Do you see anything in Qlik Sense logs from that time (broken sessions, proxy errors or anything similar)?

I understand your general question is why it worked before and now after upgrade it does not work anymore. Well - that is good question but we cannot answer it looking just at the surface. We need to dig deep and find a cause of it. If we dont find anything in the logs and have no logical explanation that what I would consider being a bug, but again... such investigation requires access to your environments, logs etc and is probably case for support rather than community. 

What about other things I mentioned?

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

True - It can be seen as generalizing problem just because we only have generic information here on community. I tried to lay out all aspects which should be looked at. The fact that you were running with unsupported objects before concerned me as it just proved that there were loopholes. I used that to highlight that in some scenarios not supported configuration may work but then suddenly it can stop working (which is exactly why it was unsupported in first place). You rightly changed all those extensions objects.

Have you made sure that there are no other unsupported objects? Maybe there is a default bookmark/trigger/action in the app?

We can argue here that i am generalizing topic and that I am focusing on everything being 100% developed by the book. All I want is to emphasize that we cannot look at the surface only. Instead we have to look at everything what NPrinting is doing when those reports run and try to pinpoint actual cause of it.

Another idea...

When you changed your templates to remove unsupported objects - did you upgrade NPrinting Designer before to ensure that it is on the same version as Server and Engine? I guess this could easily be overlooked and could corrupt your templates!

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.