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

block_on usage stalls my application #75

Closed
RAnders00 opened this issue Jul 23, 2020 · 2 comments
Closed

block_on usage stalls my application #75

RAnders00 opened this issue Jul 23, 2020 · 2 comments

Comments

@RAnders00
Copy link

The fact that the Drop implementation uses a block_on executor strategy, combined with the fact that it blocks until it gets hold of a mutex, seems to be a problem. I had to fork the project and change to a tokio::spawn-based approach that would return the connection to the pool asynchronously.
My app is retrieving a connection on every web request, and it was basically never responding after 10 requests (the configured minimum pool size). I debugged it to the point to figure out it was infinitely waiting to get() a connection from the pool.
I did not dig into it further than that quick "bandage fix". Maybe this is something that needs to be addressed generally?

This is the relevant commit: https://github.com/RAnders00/bb8/commit/e456d4c8812adc445c85852b575f728981cb5e0a

@RAnders00
Copy link
Author

Also I'm not sure how using a futures single-threaded executor combines with the standard tokio multi-threaded executor I am using. That could be a problem too.

@djc
Copy link
Owner

djc commented Nov 5, 2020

There's no longer any block_on in the Drop implementation. If you're still interested, please test current master and give me feedback.

@djc djc closed this as completed Nov 5, 2020
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

No branches or pull requests

2 participants