Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Postgres: FATAL: remaining connection slots are reserved for non-replication superuser connections

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Bastien_Laugiero

Postgres: FATAL: remaining connection slots are reserved for non-replication superuser connections

Last Update:

Feb 1, 2021 11:31:42 AM

Updated By:

Andre_Sostizzo

Created date:

Feb 1, 2021 11:31:42 AM

Attachments


Qlik Sense and NPrinting are using PostgreSQL as the database engine to store everything related to configuration. 
If this error occurs in the Windows Event Application Logs:

...
psql: FATAL: remaining connection slots are reserved for non-replication superuser connections

...

Then there may be connection trouble to the database. 
The symptoms may be:

  • Unable to connect to the web interface
  • Unable for one of the services to connect to its database

Environment:

 

Cause:


In Postgres, there is a setting called max_connections.

From https://www.postgresql.org/docs/9.6/runtime-config-connection.html

This determines the maximum number of concurrent connections to the database server. The default is typically 100 connections, but might be less if the kernel settings will not support it (as determined during initdb). This parameter can only be set at server start.

When running a standby server, set this parameter to the same or higher value than on the master server. Otherwise, queries will not be allowed in the standby server.

 

Resolution:


To resolve this issue, increase the number of maximum connections allowed.

1. Stop all services (Qlik Sense or NPrinting) and go to the postgresSQL configuration folder

  • Default for NPrinting is C:\Program Files\NPrintingServer\data\
  • Default for Qlik Sense is C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.x\

2. Open Notepad as administrator and edit the file postgresql.conf (Please ensure a backup is made before performing any changes to the file)

Search for the string "max_connections" and increase the value. In a multi-node environment, this should be adjusted to the sum of all repository connection pools + 20. By default, this value is 110 per node. For more information on what value to assign see the latest documentation under Configuring PostgreSQL multi-node connections - Qlik Sense for Admionistrators.  For example, a 6 node Qlik Sense site may require max_connections change from 110 to 680.

3. Save the file

4. Start the services and confirm that the problem has stopped. 

PostgresSQL_Max_connections.gif

 

Related Content:

Tags (1)
Labels (1)
Contributors
Version history
Last update:
‎2021-02-01 11:31 AM
Updated by: