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 postgres pool size #657

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

beenje
Copy link
Contributor

@beenje beenje commented Aug 21, 2023

When having many requests in parallel, we got issue with the database connection pool size:

sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30.00 (Background on this error at: https://sqlalche.me/e/20/3o7r)

According to the config, the default values should be 10 / 100. I found that postgres pool_size and max_overflow were passed when using get_db_manager but not in the get_db dependency.
Engine was created with the default values of 5 / 10, instead of the values from the config.

postgres pool_size and max_overflow were passed when using get_db_manager
but not in the get_db dependency.
Engine was created with the default values of 5 / 10,
instead of 10 / 100 or the values from the config.
@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: +0.05% 🎉

Comparison is base (2f819d4) 83.26% compared to head (88c25b2) 83.31%.
Report is 2 commits behind head on main.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #657      +/-   ##
==========================================
+ Coverage   83.26%   83.31%   +0.05%     
==========================================
  Files          78       78              
  Lines        6186     6205      +19     
==========================================
+ Hits         5151     5170      +19     
  Misses       1035     1035              
Files Changed Coverage Δ
quetz/deps.py 85.00% <0.00%> (ø)
quetz/main.py 86.46% <66.66%> (ø)
quetz/authorization.py 93.82% <95.00%> (+0.10%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wolfv wolfv added the enhancement New feature or request label Aug 22, 2023
@wolfv wolfv merged commit f3b5400 into mamba-org:main Aug 22, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants