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

Add max_overflow connections #2054

Merged
merged 1 commit into from
Nov 10, 2021
Merged

Add max_overflow connections #2054

merged 1 commit into from
Nov 10, 2021

Conversation

isaacsolo
Copy link
Contributor

Description

We sometimes see QueuePool timeout and run out of connections. This adds max_overflow connections (default is 10) which will be instantiated when pool_size has run out then cleaned up after use.

(20 pool_size + 10 max_overflow) * (16 gunicorn workers) = 480 connections.

Tests

How will this change be monitored?

sqlalchemy.exc.TimeoutError: QueuePool limit of size logs.

https://analytics.amplitude.com/audius/chart/ma21km1?source=redirect%3A+chart+saved

@isaacsolo isaacsolo merged commit 4960fb6 into master Nov 10, 2021
@isaacsolo isaacsolo deleted the is-max-overflow branch November 10, 2021 19:36
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.

None yet

2 participants