Question

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

Posted June 23, 2021 939 views
PostgreSQLDigitalOcean Managed PostgreSQL Database

I created a database yesterday and was able to connect to it. Today , I can’t and I’m getting this error:
[53300] FATAL: remaining connection slots are reserved for non-replication superuser connections.
I tried creating a connection pool but getting this error
[08P01] ERROR: pgbouncer cannot connect to server.
when trying to connect to it.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @GiantSeaGreenClam,

You’ll need to Edit the PostgreSQL configuration file and increase the value for maxconnections. The value for sharedbuffers may also need to be increased.

You may see here how more connections have been created:

https://www.digitalocean.com/community/tutorials/managed-databases-connection-pools-and-postgresql-benchmarking-using-pgbench

by Hanif Jetha
In this tutorial we'll use `pgbench`, PostgreSQL's built-in benchmarking tool, to run load tests on a DigitalOcean Managed PostgreSQL Database. We'll dive in to connection pools, describe how they work, and show how to create one using the Cloud Control panel. Finally, using results from the `pgbench` tests, we'll demonstrate how using a connection pool can be an inexpensive method of increasing database throughput.