-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
IOException with "Connection reset" message causes loss of requests #8243
Comments
There are a bunch of fixes in 5.0.0-alpha.12, see https://github.com/square/okhttp/blob/master/CHANGELOG.md#version-500-alpha12 While I'm not suspecting it will fix it, it would be good to rule it out first. |
Yep, I upgraded our app recently with the latest version... Let's see if that helps... Thanks, |
hi,do you try i find it is also has the connection reset problem |
Hi,
I have stumble upon an error scenario that is difficult to reproduce. I am using OkHttp3 (5.0.0-alpha.11) and Retrofit (2.9.0) with Java 11.
I use Retrofit with OkHttp3 on a backend service that makes quite a lot of post requests to another backend server using the asynchronous mode, but, although it works perfectly fine almost all the time, we had a few cases where the OkHttp3 client closed many of the active requests with the IOException with message "Connection reset" (sorry, I don't have the stacktrace). This, per se, is not an issue as we do retry these requests and the retries did succeed.
The real problem here is that a few post requests we created just a few hundred milliseconds after we got the above exception for the active requests, NEVER got a response. And when I say a response, it even includes a failure response such as an exception or a timeout. It was like these requests never existed. The problem is that the application rely on any response (successful or failure) to move on, and not getting anything is very bad.
I suspect this could be a sign of some kind of race condition somewhere. Unfortunately, I can't reproduce it locally...
I tried to understand what the "Connection reset" error meant, but I couldn't find documentation about that, even a search on the square libraries in GitHub didn't give me information.
OkHttp3 default client configuration:
New client based on default client:
Thanks,
Camiel
The text was updated successfully, but these errors were encountered: