Project

General

Profile

Actions

Bug #7

closed

Datasync error: remaining connection slots are reserved for non-replication superuser connections

Added by Lance Edgar over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
07/26/2022
Due date:
% Done:

0%

Estimated time:

Description

This is closely related to #6.

While it's possible to increase the DB pool size used for datasync via config, it apparently also is possible to hit the max connection limit imposed by PostgreSQL itself. When this happens you'll see an error like:

OperationalError: (psycopg2.OperationalError) FATAL:  remaining connection slots are reserved for non-replication superuser connections

(Background on this error at: http://sqlalche.me/e/13/e3q8)

There are a couple of Stack Overflow questions about this:

Basically the options are to increase max connection limit in PostgreSQL config, or else reduce the number of actual connections being requested (i.e. by datasync). The latter would be nice but as with #6 for now the quickest fix is probably to increase limit in PG.

Do that by editing e.g. /etc/postgresql/13/main/postgresql.conf to set:

max_connections = 200

See also docs for that setting. Be sure to restart PostgreSQL after updating its config.


Related issues 1 (1 open0 closed)

Related to Rattail - Feature #8: Add some sort of caching for config from DB settingsNewLance Edgar07/31/2022

Actions
Actions #1

Updated by Lance Edgar over 2 years ago

  • Related to Feature #8: Add some sort of caching for config from DB settings added
Actions #2

Updated by Lance Edgar over 2 years ago

  • Status changed from New to Closed

I believe the real fix here is to enable Beaker config caching, per #8.

Actions

Also available in: Atom PDF