Bug #7
closedDatasync error: remaining connection slots are reserved for non-replication superuser connections
0%
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:
- https://stackoverflow.com/questions/11847144/heroku-psql-fatal-remaining-connection-slots-are-reserved-for-non-replication
- https://stackoverflow.com/questions/52697734/postgresql-remaining-connection-slots-are-reserved-for-non-replication-superus
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.
Updated by Lance Edgar over 2 years ago
- Related to Feature #8: Add some sort of caching for config from DB settings added
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.