summary refs log tree commit diff
path: root/synapse/federation/transport
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-01-25 16:11:06 +0000
committerGitHub <noreply@github.com>2023-01-25 16:11:06 +0000
commit8e37ece015c8afd97572bdc742981792b02c6700 (patch)
treecd9da00a13e954945068fe307f5bb39b8aca29ee /synapse/federation/transport
parentMake sqlite database migrations transactional again (#14910) (diff)
downloadsynapse-8e37ece015c8afd97572bdc742981792b02c6700.tar.xz
Bump the client-side timeout for /state (#14912)
* Bump the client-side timeout for /state

to allow faster joins resyncs the chance to complete for large rooms.
We have seen this fair poorly (~90s for Matrix HQ's /state) in testing,
causing the resync to advance to another HS who hasn't seen our join yet.

* Changelog

* Milliseconds!!!!
Diffstat (limited to 'synapse/federation/transport')
-rw-r--r--synapse/federation/transport/client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py
index 556883f079..682666ab36 100644
--- a/synapse/federation/transport/client.py
+++ b/synapse/federation/transport/client.py
@@ -102,6 +102,10 @@ class TransportLayerClient:
             destination,
             path=path,
             args={"event_id": event_id},
+            # This can take a looooooong time for large rooms. Give this a generous
+            # timeout of 10 minutes to avoid the partial state resync timing out early
+            # and trying a bunch of servers who haven't seen our join yet.
+            timeout=600_000,
             parser=_StateParser(room_version),
         )