Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Error with too many database connections #203

Open
lars-petter-hauge opened this issue Feb 2, 2022 · 0 comments
Open

Error with too many database connections #203

lars-petter-hauge opened this issue Feb 2, 2022 · 0 comments

Comments

@lars-petter-hauge
Copy link

lars-petter-hauge commented Feb 2, 2022

I used the bug format, but it's not technically a bug, rather slightly incorrect handling of database connections

Describe the bug
A run with ert3 (config specs in "how to reproduce"). The following error hit from the server hosting the database:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: remaining connection slots are reserved for non-replication superuser connections

To Reproduce
Steps to reproduce the behaviour:

  1. Create ert case with 50 realisations and provide a postgres database to ert-storage. The number of input records was about 50 and the number of output records was 4.
  2. Run case and wait for feedback.

Expected behaviour
Expects the run to continue successfully.

Additional context
For a very brief googling, I found https://stackoverflow.com/questions/11847144/heroku-psql-fatal-remaining-connection-slots-are-reserved-for-non-replication which points to the following answer on a different question: https://stackoverflow.com/questions/10419665/how-does-pgbouncer-help-to-speed-up-django/10420469#10420469

It should also be noted that not all realisations are running at the same time here, as we are only spinning up 3 dask workers at one time.

@lars-petter-hauge lars-petter-hauge changed the title Properly handle many requests to database Error with too many database connections Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant