summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2023-05-03 13:09:20 +0100
committerGitHub <noreply@github.com>2023-05-03 13:09:20 +0100
commit3b837d856c4f867377d738eacb262cad28b14ad7 (patch)
tree8f401560a4c93b84a50ced5a5486c3fc930db852 /synapse/server.py
parentUpdate CHANGES.md (diff)
downloadsynapse-3b837d856c4f867377d738eacb262cad28b14ad7.tar.xz
Revert "Reduce the size of the HTTP connection pool for non-pushers" (#15530) v1.83.0rc1
#15514 introduced a regression where Synapse would encounter
`PartialDownloadError`s when fetching OpenID metadata for certain
providers on startup. Due to #8088, this prevents Synapse from starting
entirely.

Revert the change while we decide what to do about the regression.
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 75a902d64d..08ad97b952 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -27,7 +27,6 @@ from typing_extensions import TypeAlias
 
 from twisted.internet.interfaces import IOpenSSLContextFactory
 from twisted.internet.tcp import Port
-from twisted.web.client import HTTPConnectionPool
 from twisted.web.iweb import IPolicyForHTTPS
 from twisted.web.resource import Resource
 
@@ -455,26 +454,6 @@ class HomeServer(metaclass=abc.ABCMeta):
         )
 
     @cache_in_self
-    def get_pusher_http_client(self) -> SimpleHttpClient:
-        # the pusher makes lots of concurrent SSL connections to Sygnal, and tends to
-        # do so in batches, so we need to allow the pool to keep lots of idle
-        # connections around.
-        pool = HTTPConnectionPool(self.get_reactor())
-        # XXX: The justification for using the cache factor here is that larger
-        # instances will need both more cache and more connections.
-        # Still, this should probably be a separate dial
-        pool.maxPersistentPerHost = max(int(100 * self.config.caches.global_factor), 5)
-        pool.cachedConnectionTimeout = 2 * 60
-
-        return SimpleHttpClient(
-            self,
-            ip_whitelist=self.config.server.ip_range_whitelist,
-            ip_blacklist=self.config.server.ip_range_blacklist,
-            use_proxy=True,
-            connection_pool=pool,
-        )
-
-    @cache_in_self
     def get_federation_http_client(self) -> MatrixFederationHttpClient:
         """
         An HTTP client for federation.