mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Add an awful secondary timeout to fix wedged requests
This is an attempt to mitigate #3842 by adding yet-another-timeout
This commit is contained in:
parent
024be6cf18
commit
fcfe7a850d
2 changed files with 62 additions and 0 deletions
|
@ -42,6 +42,7 @@ from synapse.api.errors import (
|
|||
)
|
||||
from synapse.http.endpoint import matrix_federation_endpoint
|
||||
from synapse.util import logcontext
|
||||
from synapse.util.async_helpers import timeout_no_seriously
|
||||
from synapse.util.logcontext import make_deferred_yieldable
|
||||
from synapse.util.metrics import Measure
|
||||
|
||||
|
@ -228,6 +229,16 @@ class MatrixFederationHttpClient(object):
|
|||
)
|
||||
request_deferred.addTimeout(_sec_timeout, self.hs.get_reactor())
|
||||
|
||||
# Sometimes the timeout above doesn't work, so lets hack yet
|
||||
# another layer of timeouts in in the vain hope that at some
|
||||
# point the world made sense and this really really really
|
||||
# should work.
|
||||
request_deferred = timeout_no_seriously(
|
||||
request_deferred,
|
||||
timeout=_sec_timeout * 2,
|
||||
reactor=self.hs.get_reactor(),
|
||||
)
|
||||
|
||||
with Measure(self.clock, "outbound_request"):
|
||||
response = yield make_deferred_yieldable(
|
||||
request_deferred,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue