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

Commit f3a4be8

Browse files
authored
Shut down the DNS threadpool (#11190)
The DNS threadpool must be explicitly stopped, otherwise Synapse will hang indefinitely when asked to shut down.
1 parent 72626b7 commit f3a4be8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

changelog.d/11190.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

synapse/app/_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ async def start(hs: "HomeServer"):
346346
# numbers of DNS requests don't starve out other users of the threadpool.
347347
resolver_threadpool = ThreadPool(name="gai_resolver")
348348
resolver_threadpool.start()
349+
reactor.addSystemEventTrigger("during", "shutdown", resolver_threadpool.stop)
349350
reactor.installNameResolver(
350351
GAIResolver(reactor, getThreadPool=lambda: resolver_threadpool)
351352
)

0 commit comments

Comments
 (0)