summary refs log tree commit diff
path: root/synapse/app/_base.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-08-29 00:05:25 +0100
committerRichard van der Hoff <richard@matrix.org>2020-08-29 00:06:00 +0100
commit8027166dd546811316e7c8395deaf929110c2f3a (patch)
treeee4fa7bb1d4b94adfffc8af5c68d59ac4145f057 /synapse/app/_base.py
parentConvert ReadWriteLock to async/await. (#8202) (diff)
downloadsynapse-8027166dd546811316e7c8395deaf929110c2f3a.tar.xz
Add a comment about _LimitedHostnameResolver
Diffstat (limited to '')
-rw-r--r--synapse/app/_base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 2b2cd795e0..a43dc5b2c9 100644
--- a/synapse/app/_base.py
+++ b/synapse/app/_base.py
@@ -334,6 +334,13 @@ def install_dns_limiter(reactor, max_dns_requests_in_flight=100):
     This is to workaround https://twistedmatrix.com/trac/ticket/9620, where we
     can run out of file descriptors and infinite loop if we attempt to do too
     many DNS queries at once
+
+    XXX: I'm confused by this. reactor.nameResolver does not use twisted.names unless
+    you explicitly install twisted.names as the resolver; rather it uses a GAIResolver
+    backed by the reactor's default threadpool (which is limited to 10 threads). So
+    (a) I don't understand why twisted ticket 9620 is relevant, and (b) I don't
+    understand why we would run out of FDs if we did too many lookups at once.
+    -- richvdh 2020/08/29
     """
     new_resolver = _LimitedHostnameResolver(
         reactor.nameResolver, max_dns_requests_in_flight