Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Shut down the DNS threadpool #11190

Merged
merged 2 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11190.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests.
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions synapse/app/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ async def start(hs: "HomeServer"):
# numbers of DNS requests don't starve out other users of the threadpool.
resolver_threadpool = ThreadPool(name="gai_resolver")
resolver_threadpool.start()
reactor.addSystemEventTrigger("during", "shutdown", resolver_threadpool.stop)
reactor.installNameResolver(
GAIResolver(reactor, getThreadPool=lambda: resolver_threadpool)
)
Expand Down