Description
- Recently, performance when accessing NPrinting has been severely diminished
- Also may experience the error message when accessing the NP web console "Error when trying to open page" message
- No changes to the environment have taken place.
Environment:
Cause:
- The problem is the excessively high numbers of rows into the NPrinting postgres role_recipient table
Resolution
(Note: Before proceeding below, we recommend performing this steps in the presence of a Qlik Support representative)
Diagnosis:
- Stop all NPrinting Engine, Scheduler, and Web Engine services. (only these three services)
- Connect to the NPrinting Database via PGAdmin. If PGdmin4, go to
"C:\Program Files\NPrintingServer\pgsql\pgAdmin 4\bin"
- run pgamdin4.exe found in the 'bin' folder
- Connect to the 'NPrinting' database using the postgres superuser password used when first installing NPrinting and port 4992
- Open a Query Window in Postrgre
- To detect the current numbers of rows (including duplicates) of the role_recipient table, insert:
SELECT COUNT(*) FROM role_recipient;
- If you find millions of records, this is in most cases the cause of the issue where NPrinting performance is severely degraded.
- Use the following to check the number of actual rows that should appear (non duplicates)
SELECT COUNT(*) FROM (SELECT DISTINCT * FROM role_recipient) t;
How to remove duplicate roles:
CREATE TABLE role_recipient_tmp (recipient_id uuid, role_id uuid);
INSERT INTO role_recipient_tmp (recipient_id, role_id) SELECT DISTINCT recipient_id, role_id FROM role_recipient;
TRUNCATE TABLE role_recipient;
INSERT INTO role_recipient (recipient_id, role_id) SELECT recipient_id, role_id FROM role_recipient_tmp;
DROP TABLE role_recipient_tmp;
- Allow query above to complete processing
- Start the NPrinting Web Engine and Scheduler services
Solution:
Internal ID: