I get the following error for python application.
django.db.utils.OperationalError: FATAL: remaining connection slots are reserved for non-replication superuser connections
I use dj_database_url.py for configuring database. I am using Postgres as a database
I had set connection_max_age to 0 in the config. dj_database_url.py
Still, I get this error.
I had checked the entire source code by using grep there is no connection in the source code.
I getting this error from inside docker container. the database is outside the docker container.
the connection string I use to connect is DATABASE=postgres://test:*
where 172.17.0.1 is docker gateway.
max_connection =100 in postgresql.conf which located inside /etc/postgresql/9.5/main/
Any help is greatly appreciated.