-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
multithreaded http2 GET occasionally throws IllegalStateException #3521
Comments
@ifedorenko do any of the requests result in a redirect or auth challenge? |
This is an edge case that can occur with HTTP/2. Since multiple requests use the same connection, it's possible for one request to flag the connection as bad during a follow-up request. #3521
No, no redirects and no auth challenges according to nginx logs (all requests have |
Gotcha -- if you want some help feel free to provide the config and test case. I can help take a look. |
This is an edge case that can occur with HTTP/2. Since multiple requests use the same connection, it's possible for one request to flag the connection as bad during a follow-up request. #3521
I ran more tests and see rather wide variety of exceptions thrown when nginx tells okhttp GOWAY. I believe specific exception depends on state of individual http2 stream and timing of GOAWAY.
All other exceptions are subclasses of |
This is an edge case that can occur with HTTP/2. Since multiple requests use the same connection, it's possible for one request to restrict the connection from creating new streams during a follow-up request. #3521
I get infrequent exceptions like below when downloading artifacts from nginx on multiple threads over http2. The problem is likely related to (or at least made more severe by) nginx sending GOAWAY frames to force the client acquire new connection. I am using okhttp 3.9.0-SNAPSHOT with swankjesse's fix for #3516. I can provide nginx config and a small java app that triggers the problem semi-reliably but don't have proper standalone test.
All download threads share the same
OkHttpClient
instance and each download thread runs this (abbreviated) code:I also see another exception that may or may not be related:
The text was updated successfully, but these errors were encountered: