Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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