Skip to content

How to do retries after timeouts? #279

Answered by sholladay
sykim4 asked this question in Q&A
Discussion options

You must be logged in to vote

Timeout means to give up on the request, e.g. to avoid having users stare at a loading spinner forever. I can see how this could be a little confusing since if the request seems to be hanging, then one could argue it is in a failure state and we retry other failure states. However, the difference is that in the other cases we have a definitive result, whereas a timeout is more like a judgement or prediction without any contextual information. Retrying a request just because it's taking a long time is probably not advisable in most cases. The server might be overloaded and retries would exacerbate the problem. The internet connection might be slow and retries would probably not improve the…

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@steveoh
Comment options

Comment options

You must be logged in to vote
1 reply
@steveoh
Comment options

Answer selected by sindresorhus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #279 on December 10, 2020 17:33.