I’m getting a lot of failures when running bulk tasks that are resulting in the below error. Is there a process on how to correct this? The database is on a standalone server.
FATAL: remaining connection slots are reserved for non-replication superuser connections
There is a setting which controls how many concurrent connection the database accepts (something something pool-size). This error usually means all the available connections were depleted. Either you have it set to a too low value, or something is eating up way more connections than it should, or both. Checking what’s going on would be a good start
Thanks. Looks like the default value is 5. Not sure if this means max connections 5 or not. I’d imagine that might be kind of low if it is… The database server should be able to accept much more than that. I think it’s probably happening because there are a lot of bulk processes going on (sometimes I’m tasking foreman to ssh into hundreds of hosts). What would be a good setting to test with?
We may be talking about a different thing. What I meant, and described badly, is the max_connection
setting for postgres as per[1], not for foreman.
Having max_connections set to 5 would be very, very low.
[1] - PostgreSQL: Documentation: 12: 19.3. Connections and Authentication
I’ll start playing with the postgres setting… thanks for the help.