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

Retry acquiring transaction when pool reaches max_num_connection #348

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Jul 10, 2023

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

If the underline database pool is full (ex pgBouncer) and trying to acquire a new transaction the request will fail with:

no more connections allowed (max_client_conn)

What is the new behavior?

Adding retry login when acquiring the transaction and the max connection is thrown. We will retry acquiring the transaction and not fail the request

@github-actions
Copy link

Pull Request Test Coverage Report for Build 5507163780

  • 20 of 33 (60.61%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 85.118%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/database/connection.ts 20 33 60.61%
Totals Coverage Status
Change from base Build 5476983595: -0.1%
Covered Lines: 7303
Relevant Lines: 8505

💛 - Coveralls

@fenos fenos merged commit 23d6602 into master Jul 10, 2023
1 check passed
@fenos fenos deleted the connetion/retry-when-full branch July 10, 2023 11:05
@github-actions
Copy link

🎉 This PR is included in version 0.41.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants