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

awc connection pool with limit = 0 always times out #2514

Closed
mvalenzuelamoixa opened this issue Dec 14, 2021 · 3 comments · Fixed by #2684
Closed

awc connection pool with limit = 0 always times out #2514

mvalenzuelamoixa opened this issue Dec 14, 2021 · 3 comments · Fixed by #2684
Assignees
Labels
A-awc project: awc C-bug Category: bug
Milestone

Comments

@mvalenzuelamoixa
Copy link

Expected Behavior

The documentation for awc states that .limit(0) means the connector has no limit. However, it seems that after this change:

#1994

The limit = 0 case stopped being handled differently, and instead now a semaphore with 0 permits is created, leading to the client not working. Looks like a regression.

Current Behavior

Requests always time out.

Possible Solution

I would say making the builder interface more idiomatic by accepting an Option would be good, then handle the None case separately if we want to keep that functionality. Otherwise, if we always want to have a limit I would change the documentation.

Steps to Reproduce (for bugs)

Create an awc::Client with limit = 0.

Your Environment

Latest beta version of awc (3.0.0-beta.13) on rustc 1.51.0.

@robjtede robjtede added A-awc project: awc C-bug Category: bug labels Dec 14, 2021
@mvalenzuelamoixa
Copy link
Author

By the way, I am happy to contribute either of the changes (handle infinite limit differently, with or without builder interface change; or docs change), but I would need some direction on which way to go.

@robjtede
Copy link
Member

cc @fakeshadow

@fakeshadow
Copy link
Contributor

No limit should just go. awc does not offer protocol specific setting and it's already a problem in it's own.
Namely awc does not do any form of connection multiplexing at all which is anti-pattern for http2.

@robjtede robjtede added this to the awc v3 milestone Mar 8, 2022
@robjtede robjtede self-assigned this Mar 8, 2022
robjtede added a commit that referenced this issue Mar 8, 2022
@robjtede robjtede linked a pull request Mar 8, 2022 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-awc project: awc C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants