From bceec6591311eeefe94efcd4e40a116ee73aad8b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 17 Nov 2015 15:10:05 +0000 Subject: Slightly more aggressive retry timers at HTTP level --- synapse/http/matrixfederationclient.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'synapse/http/matrixfederationclient.py') diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index 6e53538a52..ca9591556d 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -56,7 +56,7 @@ incoming_responses_counter = metrics.register_counter( ) -MAX_RETRIES = 4 +MAX_RETRIES = 10 class MatrixFederationEndpointFactory(object): @@ -184,7 +184,8 @@ class MatrixFederationHttpClient(object): ) 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) yield sleep(delay) retries_left -= 1 -- cgit 1.4.1