I'm developing an app on Heroku with a Postgresql backend. Periodically, I get this error message when trying to access the database, both from the CLI and from loading a page on the server:
psql: FATAL: remaining connection slots are reserved for non-replication superuser connections
Anyone seen this before or please help point me in the right direction?
You either need to increase the max_connections
configuration setting or (probably better) use connection pooling to route a large number of user requests through a smaller connection pool.
https://wiki.postgresql.org/wiki/Number_Of_Database_Connections