Closed kenranunderscore closed 1 year ago
@kenranunderscore How many connections do you have configured in your postgres? This is the max_connections
parameter that you can see with SHOW max_connections;
in a psql
shell.
100 with Docker.
I could just now reproduce the problem when using the postgresql_14
nixos systemd service as well, where max_connections
is also set to 100.
hmm, could you tweak either the parameter for postgres or $FLORA_DB_POOL_CONNECTIONS
? If you set the latter to something like 90, does it still fail?
Ah, sorry that I didn't realize I could set this myself. I "bisected" the value and it seems like the magic number is 96 :grin: everything higher than that provokes the error.
So since I can work around this myself, I can of course close the issue. But since 100 seems to be the default postgres value, it might be wise to have a slightly lower default value of FLORA_DB_POOL_CONNECTIONS
?
Yep, I'll integrate that change in the PR I'm working on right now. Thank you for the ticket. :)
Environment
Also, I'm using the
database
docker postgres image (tried a couple of versions) as database. If I can find the time, I'll see if I can test this with a postgres systemd service instead as well.Expected Behaviour
I can run
make db-provision
without errors.Actual Behaviour
It never seems to finish in the
test-packages
step, and there are the following errors in thedocker compose logs database
:Instructions for reproduction
I can reproduce this in two setups. Please let me know if I'm doing something wrong here. I thought it should not be a problem using the docker image as database. This is the last thing preventing me from trying my hands on some Haskell :) What I'd love is to have some test data in the database in order to try out stuff.
Local setup with docker database
docker compose up -d database
source environment.sh
make db-reset
Sometimes the
make db-provision
that is called also fails, sometimes it's stuck as written above.Docker-only (using #370)
make docker-build
make docker-enter
source environment.docker.sh
make db-reset