Skip to content
Snippets Groups Projects
Commit bceec659 authored by Erik Johnston's avatar Erik Johnston
Browse files

Slightly more aggressive retry timers at HTTP level

parent 9eff52d1
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ incoming_responses_counter = metrics.register_counter( ...@@ -56,7 +56,7 @@ incoming_responses_counter = metrics.register_counter(
) )
MAX_RETRIES = 4 MAX_RETRIES = 10
class MatrixFederationEndpointFactory(object): class MatrixFederationEndpointFactory(object):
...@@ -184,7 +184,8 @@ class MatrixFederationHttpClient(object): ...@@ -184,7 +184,8 @@ class MatrixFederationHttpClient(object):
) )
if retries_left and not timeout: if retries_left and not timeout:
delay = 5 ** (MAX_RETRIES + 1 - retries_left) delay = 4 ** (MAX_RETRIES + 1 - retries_left)
delay = max(delay, 60)
delay *= random.uniform(0.8, 1.4) delay *= random.uniform(0.8, 1.4)
yield sleep(delay) yield sleep(delay)
retries_left -= 1 retries_left -= 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment