Skip to content

Workaround for hyper hangup #98

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

Closed
wants to merge 3 commits into from

Conversation

nyuichi
Copy link
Contributor

@nyuichi nyuichi commented Oct 23, 2020

As I described in hyperium/hyper#2306, hyper 0.12 seems have a bug that the event loop hangs up at a very low probability.
This PR introduces an easy (but fairly ungly) workaround for this issue.
Namely, it remotes the first "/" from the query path "/events?" to avoid unnecessary redirection handling.
Currently all GET queries from dockworker should look like "http://localhost:3275//events?" and this PR just removes the redundant slash.
I only removed the slash from the "/events" and "/images/create" APIs because they are the only APIs that return iterators.

I confirmed that the test I added in this PR first failed and after the second commit it succeeded.

@nyuichi nyuichi force-pushed the workaround-hyper-hangup branch from a5d90a8 to cedf91b Compare October 23, 2020 07:04
@nyuichi
Copy link
Contributor Author

nyuichi commented Oct 23, 2020

It seems that my test in this pull request does not fail in Circle CI even without the patch that removes extra slashes.
I fixed the test case so that it succeeds in Circle CI both before and after the patch. (Running that test case in my local environment still reproduces the bug.)

@nyuichi
Copy link
Contributor Author

nyuichi commented Oct 23, 2020

We concluded that the root cause of this glitch is the same one discussed in this thread rust-lang/futures-rs#1170.
So I close this PR and am going to bump up tokio/hyper/futures to newer versions instead.

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

Successfully merging this pull request may close these issues.

1 participant