I explored DigitalOceans Managed Databases particularly PostgreSQL as a means to simplify development and save time although I found that very frequently there would be the following error:
Error: remaining connection slots are reserved for non-replication superuser connections. sorry, too many clients already
I noticed that this error would occur quite frequently regardless of what was invoking the database for example as to whether a tool like DataGrip / PgAdmin were being used or the backend server. At first I thought it was related to the backend server until I started getting the error within DataGrip additionally.
We’re using Strapi and PostgreSQL, with 3 developers working on this simultaneously.
I’ve explored using connection pooling although have had the following error with both database tool and server:
cross database references are not implemented
I’ve now explored creating and hosting my own PostgreSQL database on a DigitalOcean Ubuntu droplet and the error no longer seems to occur.
So whilst I’ve found a solution or workaround, I am interested as to why this error occurs with DigitalOcean Managed PostgreSQL Database.
Thanks for your help :)
Michael
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Each PostgreSQL cluster allows 25 backend connections per 1 GB of RAM minus 3 connections per node that are reserved for maintenance.
Here is a quick overview of the allowed backend connections based on each plan:
| Plan Size | Available Backend Connections |
|---|---|
| 1 GB RAM | 22 |
| 2 GB RAM | 47 |
| 4 GB RAM | 97 |
| 8 GB RAM | 197 |
| 16 GB RAM | 397 |
| 32 GB RAM | 797 |
| 64 GB RAM | 1,597 |
Connection pooling is also supported, backed by PgBouncer, to increase the number of available concurrent client connections. However, these PgBouncer pool connections are currently limited to 20 per database.
Hope that this helps. Regards, Bobby
Same thing on my side. Created a pool connection as recommended in current documentation and I’m still facing the same problem.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.