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: Increase connection pool to 20 concurrent database connections #1924

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Oct 24, 2024

Due to the asynchronous nature of FastAPI and the number of requests, it can happen that we have to handle more than the default of 5 requests at the same time.

In addition, reduce the pool timeout to 5. The goal is to fail requests if they can't get a database session within 5 seconds instead of spawning a queue with wait times of 30 seconds, which can lead to a blocking backend.

Resolves #1914

Copy link

github-actions bot commented Oct 24, 2024

API Changelog 4.8.3.dev9+gd863e2da

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.68%. Comparing base (7963611) to head (ce5cb51).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1924   +/-   ##
=======================================
  Coverage   84.68%   84.68%           
=======================================
  Files         206      206           
  Lines        6739     6739           
  Branches      463      463           
=======================================
  Hits         5707     5707           
  Misses        870      870           
  Partials      162      162           

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

This comment has been minimized.

Due to the asynchronous nature of FastAPI and the number of requests,
it can happen that we have to handle more than the default of 5 requests
at the same time.

In addition, reduce the pool timeout to 5. The goal is to fail requests
if they can't get a database session within 5 seconds instead of spawning
a queue with wait times of 30 seconds, which can lead to a blocking backend.
Copy link

sonarcloud bot commented Oct 24, 2024

Copy link

This report was generated by comparing d863e2d with 7963611.
If you would like to check difference, please check here.

change detected

ArtifactName: reg

item count
pass 340
change 2
new 0
delete 0
📝 Report

Differences

Session Components_Feedback_One Session With User Information_desktop.png

actual Actual
expected Expected
difference Difference

Session Components_Feedback_Rating Selected_desktop.png

actual Actual
expected Expected
difference Difference

@MoritzWeber0 MoritzWeber0 merged commit efb43ea into main Oct 24, 2024
30 checks passed
@MoritzWeber0 MoritzWeber0 deleted the pool-size branch October 24, 2024 10:16
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.

SQLAlchemy: QueuePool limit of size 5 overflow 10 reached
1 participant