From 6aca4e7cb8818a6d0928108f5e25a6b582842a7d Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 2 May 2023 09:29:40 -0400 Subject: Reduce the size of the HTTP connection pool for non-pushers. (#15514) Pushers tend to make many connections to the same HTTP host (e.g. a new event comes in, causes events to be pushed, and then the homeserver connects to the same host many times). Due to this the per-host HTTP connection pool size was increased, but this does not make sense for other SimpleHttpClients. Add a parameter for the connection pool and override it for pushers (making a separate SimpleHttpClient for pushers with the increased configuration). This returns the HTTP connection pool settings to the default Twisted ones for non-pusher HTTP clients. --- synapse/push/httppusher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'synapse/push/httppusher.py') diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 4f8fa445d9..a01445e374 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -140,7 +140,8 @@ class HttpPusher(Pusher): ) self.url = url - self.http_client = hs.get_proxied_blacklisted_http_client() + self.http_client = hs.get_pusher_http_client() + self.data_minus_url = {} self.data_minus_url.update(self.data) del self.data_minus_url["url"] -- cgit 1.5.1