Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-44050: Configure Postgres connection pool parameters #1001

Merged
merged 2 commits into from
Apr 25, 2024

Commits on Apr 25, 2024

  1. Enable pool_pre_ping

    Turn on the SQLAlchemy pool_pre_ping option so that it checks that a database connection is live before using it.
    
    This mitigates an issue where database exceptions would be thrown from the Butler when re-using old connections from the pool that had gone stale.
    dhirving committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    1680c3a View commit details
    Browse the repository at this point in the history
  2. Prevent excess DB re-connection for services

    Previously, the pool size for postgres DB connections was set to 1.  This was causing SQLAlchemy to create a new connection from scratch any time there was more than one thread simultaneously using Butlers sharing a connection pool (as is typical in service use cases.)
    dhirving committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    613a1ed View commit details
    Browse the repository at this point in the history