question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with retry on connection failure

See original GitHub issue

Most of our clients are receiving this kind of exceptions per our logs.

1 2

What they complain about is that data is uploaded to the server but mobile still shows as not uploaded. I have researched a bit and found that okHttp is retrying requests on connection failure and guess it is related to this topic. I can’t create a case while debugging the app. I have tried to connect to 10.10.10.1, it is getting socket timeout, but it seems that okhttp doesn’t retry this request. It just returns on this line if (!streamAllocation.hasMoreRoutes()) return false; (okhttp v3.12.1). I can’t see any logs on retrying in logcat or stetho. How to reproduce this case? Should okHttp retry in this case? Will disabling retry help in this case?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
swankjessecommented, Apr 19, 2019

If you install your logging interceptor as a network interceptor, you’ll see more.

0reactions
androidevelopercommented, Apr 19, 2019

And shouldn’t logging interceptor log something in case of retries?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with okhttp silent retry on connection failure
I have tried to connect to 10.10.10.1, it is getting socket timeout, but it seems that okhttp doesn't retry this request. It just...
Read more >
Working with transient errors - Azure SQL Database
When a SQL Database or SQL Managed Instance UPDATE statement fails with a transient error, establish a fresh connection before you retry the ......
Read more >
Try. And then retry. There can be failure. | Neo4j Developer Blog
With persistent network connections between things, the exceptional case should be expected and not considered to be a surprise.
Read more >
Timeouts, retries and backoff with jitter - Amazon AWS
If errors are caused by load, retries can be ineffective if all clients retry at the same time. To avoid this problem, we...
Read more >
Never Give Up, Retry: How Software Should Deal with Failures
ConnectionError - we failed to perform a connection handshake successfully. The connection might be not stable on the network level at the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found