From 4dec901c76e29ad029f53ce199450d75ec8d2ad5 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 21 Oct 2015 10:10:55 +0100 Subject: Cap the time to retry txns to appservices to 8.5 minutes There's been numerous issues with people playing around with their application service and then not receiving events from their HS for ages due to backoff timers reaching crazy heights (albeit capped at < 1 day). Reduce the max time between pokes to be 8.5 minutes (2^9 secs) which is quick enough for people to wait it out (avg wait time being 4.25 min) but long enough to actually give the AS breathing room if it needs it. --- synapse/appservice/scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/appservice') diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py index 59b0b1f4ac..44dc2c4744 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py @@ -224,8 +224,8 @@ class _Recoverer(object): self.clock.call_later((2 ** self.backoff_counter), self.retry) def _backoff(self): - # cap the backoff to be around 18h => (2^16) = 65536 secs - if self.backoff_counter < 16: + # cap the backoff to be around 8.5min => (2^9) = 512 secs + if self.backoff_counter < 9: self.backoff_counter += 1 self.recover() -- cgit 1.4.1