Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
06a1f3e2
Commit
06a1f3e2
authored
5 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Reduce timeout for outbound /key/v2/server requests.
parent
fec2dcb1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/crypto/keyring.py
+13
-0
13 additions, 0 deletions
synapse/crypto/keyring.py
with
13 additions
and
0 deletions
synapse/crypto/keyring.py
+
13
−
0
View file @
06a1f3e2
...
...
@@ -786,6 +786,19 @@ class ServerKeyFetcher(BaseV2KeyFetcher):
path
=
"
/_matrix/key/v2/server/
"
+
urllib
.
parse
.
quote
(
requested_key_id
),
ignore_backoff
=
True
,
# we only give the remote server 10s to respond. It should be an
# easy request to handle, so if it doesn't reply within 10s, it's
# probably not going to.
#
# Furthermore, when we are acting as a notary server, we cannot
# wait all day for all of the origin servers, as the requesting
# server will otherwise time out before we can respond.
#
# (Note that get_json may make 4 attempts, so this can still take
# almost 45 seconds to fetch the headers, plus up to another 60s to
# read the response).
timeout
=
10000
,
)
except
(
NotRetryingDestination
,
RequestSendFailed
)
as
e
:
raise_from
(
KeyLookupError
(
"
Failed to connect to remote server
"
),
e
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment