-1

I keep getting remaining connection slots are reserved for non-replication superuser connections errors when I run postgres:latest in Docker with Docker Compose.

How can I increase the maximum connections Postgres allows with Docker-Compose?

Note: This is not about Postgres alone, but rather how to pass the values to the official Postgres image on Docker.

0

1 Answer 1

-1

You can change the configuration file used by your postgresql image: https://docs.docker.com/samples/library/postgres/#database-configuration

The parameter you want to change is: max_connections, you will find more information about it here : How to increase the max connections in postgres?

Sign up to request clarification or add additional context in comments.

1 Comment

The documentation above refers to mounting a custom postgresql.conf file with the desired modified max_connections and shared_buffers value, or alternatively set them directly on the run line, e.g. docker run -d --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword postgres -c shared_buffers=256MB -c max_connections=200

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.