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

editoast: fix db connections pool size #2663

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Dec 20, 2022

By default:

  • diesel create a pool of nb_worker * 4 connections
  • rocket instantiates threads * 2 worker

On my machine, I had 64 connections created.

This is an issue cause we can easily reach postgresql limit (around 200).
I suspect that this is the cause of issues within the github CI

@flomonster flomonster requested a review from a team as a code owner December 20, 2022 13:28
Copy link
Contributor

@Khoyo Khoyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Khoyo Khoyo enabled auto-merge (rebase) December 20, 2022 13:33
@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

Merging #2663 (1f25d30) into dev (76182fe) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                dev    #2663   +/-   ##
=========================================
  Coverage     37.29%   37.30%           
  Complexity     1679     1679           
=========================================
  Files           578      578           
  Lines         17598    17599    +1     
  Branches       2435     2435           
=========================================
+ Hits           6564     6566    +2     
+ Misses        10657    10656    -1     
  Partials        377      377           
Flag Coverage Δ
editoast 70.82% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
editoast/src/client/postgres_config.rs 50.00% <ø> (ø)
editoast/src/schema/signal.rs 78.57% <ø> (ø)
editoast/src/views/infra/mod.rs 86.95% <ø> (ø)
editoast/src/views/infra/objects.rs 100.00% <ø> (ø)
editoast/src/views/mod.rs 100.00% <ø> (ø)
editoast/src/main.rs 30.58% <100.00%> (+0.82%) ⬆️
editoast/src/generated_data/utils.rs 84.21% <0.00%> (+5.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@flomonster flomonster disabled auto-merge December 20, 2022 13:38
@flomonster flomonster merged commit beaa53c into dev Dec 20, 2022
@flomonster flomonster deleted the fam/fix-db-pool-size branch December 20, 2022 13:39
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.

5 participants