<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Postgres: FATAL: remaining connection slots are reserved for non-replication superuser connections in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Postgres-FATAL-remaining-connection-slots-are-reserved-for-non/ta-p/1715939</link>
    <description>&lt;P&gt;&lt;BR /&gt;Qlik Sense and NPrinting are using PostgreSQL as the database engine to store everything related to configuration.&amp;nbsp;&lt;BR /&gt;If this error occurs in the Windows Event Application Logs:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;psql: FATAL: remaining connection slots are reserved for non-replication superuser connections&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Then there may be connection trouble to the database.&amp;nbsp;&lt;BR /&gt;The symptoms may be:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Unable to connect to the web interface&lt;/LI&gt;
&lt;LI&gt;Unable for&amp;nbsp;one of the services to connect to its database&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;Environment:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;, all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Cause:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;In Postgres, there is a setting called &lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;A title="https://www.postgresql.org/docs/9.6/runtime-config-connection.html" href="https://www.postgresql.org/docs/9.6/runtime-config-connection.html" target="_blank" rel="noreferrer noopener"&gt;https://www.postgresql.org/docs/9.6/runtime-config-connection.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;initdb). This parameter can only be set at server start.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;To resolve this issue, increase the number of maximum connections allowed.&lt;/P&gt;
&lt;P&gt;1. Stop all services (Qlik Sense or NPrinting) and go to the postgresSQL configuration folder&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Default for NPrinting is&amp;nbsp;&lt;FONT face="courier new,courier"&gt;C:\Program Files\NPrintingServer\data\&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Default for Qlik Sense is &lt;FONT face="courier new,courier"&gt;C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.x\&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;2. Open Notepad as administrator and edit the file&amp;nbsp;&lt;FONT face="courier new,courier"&gt;postgresql.conf&lt;/FONT&gt; (Please ensure a backup is made before performing any changes to the file)&lt;BR /&gt;&lt;BR /&gt;Search for the string "&lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt;" and increase the value. I&lt;SPAN&gt;n 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.&lt;/SPAN&gt;&amp;nbsp;For more information on what value to assign see the latest documentation under&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense-admin/Subsystems/DeployAdministerQSE/Content/Sense_DeployAdminister/QSEoW/Deploy_QSEoW/Installing-Qlik-Sense-multi-node.htm#anchor-4" target="_blank" rel="noopener"&gt;Configuring PostgreSQL multi-node connections - Qlik Sense for Admionistrators.&lt;/A&gt;&amp;nbsp; For example, a 6 node Qlik Sense site may require &lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt; change from 110 to 680.&lt;BR /&gt;&lt;BR /&gt;3. Save the file&lt;/P&gt;
&lt;P&gt;4. Start the services and confirm that the problem has stopped.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PostgresSQL_Max_connections.gif" style="width: 800px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45136i387FAEA4E36D7A0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="PostgresSQL_Max_connections.gif" alt="PostgresSQL_Max_connections.gif" /&gt;&lt;/span&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Related Content:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/sense-admin/Subsystems/DeployAdministerQSE/Content/Sense_DeployAdminister/QSEoW/Deploy_QSEoW/Installing-Qlik-Sense-multi-node.htm#anchor-4" target="_self"&gt;Configuring PostgreSQL multi-node connections - Qlik Sense for Administrators&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Mon, 01 Feb 2021 16:31:42 GMT</pubDate>
    <dc:creator>Bastien_Laugiero</dc:creator>
    <dc:date>2021-02-01T16:31:42Z</dc:date>
    <item>
      <title>Postgres: FATAL: remaining connection slots are reserved for non-replication superuser connections</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Postgres-FATAL-remaining-connection-slots-are-reserved-for-non/ta-p/1715939</link>
      <description>&lt;P&gt;&lt;BR /&gt;Qlik Sense and NPrinting are using PostgreSQL as the database engine to store everything related to configuration.&amp;nbsp;&lt;BR /&gt;If this error occurs in the Windows Event Application Logs:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;psql: FATAL: remaining connection slots are reserved for non-replication superuser connections&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;...&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Then there may be connection trouble to the database.&amp;nbsp;&lt;BR /&gt;The symptoms may be:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Unable to connect to the web interface&lt;/LI&gt;
&lt;LI&gt;Unable for&amp;nbsp;one of the services to connect to its database&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;Environment:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Qlik Sense Enterprise on Windows" id="qlikSenseEnterpriseWindows"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;, all versions&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Cause:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;In Postgres, there is a setting called &lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;A title="https://www.postgresql.org/docs/9.6/runtime-config-connection.html" href="https://www.postgresql.org/docs/9.6/runtime-config-connection.html" target="_blank" rel="noreferrer noopener"&gt;https://www.postgresql.org/docs/9.6/runtime-config-connection.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;initdb). This parameter can only be set at server start.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;To resolve this issue, increase the number of maximum connections allowed.&lt;/P&gt;
&lt;P&gt;1. Stop all services (Qlik Sense or NPrinting) and go to the postgresSQL configuration folder&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Default for NPrinting is&amp;nbsp;&lt;FONT face="courier new,courier"&gt;C:\Program Files\NPrintingServer\data\&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Default for Qlik Sense is &lt;FONT face="courier new,courier"&gt;C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.x\&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;2. Open Notepad as administrator and edit the file&amp;nbsp;&lt;FONT face="courier new,courier"&gt;postgresql.conf&lt;/FONT&gt; (Please ensure a backup is made before performing any changes to the file)&lt;BR /&gt;&lt;BR /&gt;Search for the string "&lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt;" and increase the value. I&lt;SPAN&gt;n 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.&lt;/SPAN&gt;&amp;nbsp;For more information on what value to assign see the latest documentation under&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense-admin/Subsystems/DeployAdministerQSE/Content/Sense_DeployAdminister/QSEoW/Deploy_QSEoW/Installing-Qlik-Sense-multi-node.htm#anchor-4" target="_blank" rel="noopener"&gt;Configuring PostgreSQL multi-node connections - Qlik Sense for Admionistrators.&lt;/A&gt;&amp;nbsp; For example, a 6 node Qlik Sense site may require &lt;FONT face="courier new,courier"&gt;max_connections&lt;/FONT&gt; change from 110 to 680.&lt;BR /&gt;&lt;BR /&gt;3. Save the file&lt;/P&gt;
&lt;P&gt;4. Start the services and confirm that the problem has stopped.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PostgresSQL_Max_connections.gif" style="width: 800px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45136i387FAEA4E36D7A0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="PostgresSQL_Max_connections.gif" alt="PostgresSQL_Max_connections.gif" /&gt;&lt;/span&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Related Content:&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/sense-admin/Subsystems/DeployAdministerQSE/Content/Sense_DeployAdminister/QSEoW/Deploy_QSEoW/Installing-Qlik-Sense-multi-node.htm#anchor-4" target="_self"&gt;Configuring PostgreSQL multi-node connections - Qlik Sense for Administrators&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 01 Feb 2021 16:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Postgres-FATAL-remaining-connection-slots-are-reserved-for-non/ta-p/1715939</guid>
      <dc:creator>Bastien_Laugiero</dc:creator>
      <dc:date>2021-02-01T16:31:42Z</dc:date>
    </item>
  </channel>
</rss>

