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

fix db connection pool #1529

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix db connection pool #1529

wants to merge 2 commits into from

Conversation

terrazoon
Copy link
Contributor

@terrazoon terrazoon commented Jan 9, 2025

Description

It looks like our SQL Alchemy instance comes with a connection pool, but we didn't actually have it configured and it was running with defaults. And the default pool size is 5, so that was pretty low considering we had 4 workers and 4 child processes per working. I think the fact that max_overflow defaults to 10 is what saved us, because we were just constantly in a state of max overflow with 15 total connections.

We are now increasing concurrency a lot. On production we will have 4 workers with 10 threads each so we need 40 db connections in case they are all using the db at the same time.

Security Considerations

N/A

@terrazoon terrazoon self-assigned this Jan 9, 2025
@terrazoon terrazoon linked an issue Jan 9, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix db connection pool
1 participant