sqlx-core pools optionally immediately return ConnectionRefused errors instead of hanging and returning PoolTimedOut #3929
+15
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
instead of hanging until the timeout and returning a PoolTimedOut error
Does your PR solve an issue?
fixes #744
this also would fix a bunch of duplicate / similar issues, didn't take the time to list them all.
Is this a breaking change?
following the last commit, no, it's a new options when creating the pool.
as mentioned by my comment in the issue :
if your db goes down you don't want users to have to wait a few seconds to get an error when they could get some 500 error immediately.
i understand that the pr may need some edits, but i wanted this issue to get some attention.