Okhttp Keeps Getting Streamresetexception: Stream Was Reset: Internal_error When It's 200
I got StreamResetException: stream was reset: INTERNAL_ERROR from OkHttp. What's the problem? Here's the logs. I/okhttp.OkHttpClient: <-- 200 https://www.example.com/user/list (
Solution 1:
As suggested in OkHttp issue tracker, mostly likely this is a server error after the headers are sent.
https://github.com/square/okhttp/issues/3936
Typically error code is sent by a server to indicate a problem server-side. It could also happen if OkHttp’s stream reader crashes with an unexpected exception.
I'd suggest checking for server errors if you can, but you can see the Http2 frame from the server here
D/okhttp.Http2: << 0x00000003 4 RST_STREAM
Solution 2:
it was Nginx buffer size problem.
If you are using AWS EC2,
Go to /etc/nginx/default.d/server.conf
And set,
proxy_redirect off;
proxy_buffering off;
Post a Comment for "Okhttp Keeps Getting Streamresetexception: Stream Was Reset: Internal_error When It's 200"