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

ameliorate awc timeouts on windows #1662

Closed
wants to merge 1 commit into from
Closed

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Sep 10, 2020

PR Type

Bug Workaround

PR Checklist

  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

Works around issues on Windows seemingly caused by slow DNS lookups by doubling the default timeout period when built for Windows.

See conversation in #1560

cc: @Pzixel @popzxc

@robjtede robjtede marked this pull request as ready for review September 10, 2020 10:30
@robjtede robjtede requested review from a team September 10, 2020 10:30
Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

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

I guess, it is now possible to make awc doctests use https. However, I'm not sure if it's right thing to do, as the Windows tests will still be very slow and may randomly fail.

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2020

Codecov Report

Merging #1662 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1662      +/-   ##
==========================================
- Coverage   53.34%   53.32%   -0.02%     
==========================================
  Files         120      120              
  Lines       11815    11819       +4     
==========================================
  Hits         6303     6303              
- Misses       5512     5516       +4     
Impacted Files Coverage Δ
awc/src/builder.rs 19.67% <0.00%> (-0.33%) ⬇️
actix-http/src/header/common/mod.rs 14.28% <0.00%> (-2.39%) ⬇️
actix-http/src/header/common/content_language.rs
actix-http/src/header/common/last_modified.rs
actix-http/src/header/common/if_match.rs 0.00% <0.00%> (ø)
actix-http/src/header/common/if_modified_since.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e39d166...3923159. Read the comment docs.

@robjtede robjtede linked an issue Sep 10, 2020 that may be closed by this pull request
@robjtede robjtede requested a review from a team September 10, 2020 11:21
@robjtede
Copy link
Member Author

However, I'm not sure if it's right thing to do...

I'm not totally sure either, but the other thing to do for now is nothing... :/

@Pzixel
Copy link

Pzixel commented Sep 10, 2020

I still believe 10 sec delay for any request is insane. It doesn't actually fix the problem as I see it, it only changes its kind

@popzxc
Copy link
Member

popzxc commented Sep 10, 2020

But as we already pointed before, the problem is not located within any of the actix crates.

Proper ways of resolving this issue (which are either replacing the dependency or fixing the issue in the dependency, and then waiting for it to release a new version) will take much longer.

IMHO, slowly working code is better that code that doesn't work. So I think that it's an acceptable temporary workaround.

By the way, any help with a proper solution will be really appreciated 🙃

@Pzixel
Copy link

Pzixel commented Sep 10, 2020

I aggree. But I don't think 10 sec NS lookup is anywhere near acceptable.

So I'd propose to either not deliver the crate on windows at all (with CFG and explanation) or no actions to "fix" it in this crate. It's indeed dependencies problem, so the proper solution is fixing/replacing dependency. I probably should create an issue in this dependency repository if you didn't already.

Any fix is appreciated if it helps, but this one just changes one problem (not working at all) to another (working inapplicable slowly).

But I'm not strong on this point so you may right with this fix

@cetra3
Copy link
Contributor

cetra3 commented Sep 10, 2020

Looks like we're working around a bug in trust-dns so I'm not in support of this change. I have had issues with that crate before, so I think a more appropriate fix is to raise it in there.

@robjtede robjtede closed this Sep 10, 2020
@robjtede robjtede deleted the hack/awc-windows branch September 10, 2020 23:40
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.

None yet

6 participants