Search code examples
javaweb-servicestomcatretrofithttp-error

getting too many follow-up request as response of request


we have a Restful web service created using Jersey and running on TomEE 7.0.3

we are using Android platform for client-side and it's using Retrofit for having communication with the server.

our system is modular and contains more than 14 parts.

about 3 weeks (until now), sometimes the clients getting too many follow-up requests as the response.

we searched for it in here and retrofit issues in github.

they said that it might be server falt so we trace the request with ngrep command on the server.

we saw that server was getting the request and also responding to it correctly even when clients get follow-up.

we also test this matter with different networks and this matter still remains.

so what else could cause this problem?


Solution

  • after several tests, we realized that this error is only on Android platforms (we tested the APIs with Postman when Android platforms were receiving Too many follow up request.

    so after some more tests, we found out, when Android platforms get 408 as a response code they show this message. we changed the status code and this problem fixed.

    I put this issue on square/okhttp repository in github and they put the bug flag on it.

    you can see it here

    ---- update ----

    they said it fixed in OkHttp v3.10