What steps will reproduce the problem?
1. Let Prosody do DNS requests.
What is the expected output?
Prosody does the DNS requests, and work forever.
What do you see instead?
Prosody runs out of fds, keeping all of the UDP sockets to my resolver open.
What version of the product are you using? On what operating system?
Trunk version 0bb46a1bb398, on ArchLinux.
Please provide any additional information below.
This didn’t seem to be happening on a version a few months older.
Thanks for the report. This is most likely because net.server holds on to all sockets until they are explicitly closed.
diff -r 144666d0ad2f -r c46c2942b8fe plugins/mod_s2s/mod_s2s.lua
--- a/plugins/mod_s2s/mod_s2s.lua Sun Jun 10 17:45:49 2018 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua Sun Jun 17 20:02:40 2018 +0200
@@ -206,6 +206,9 @@ function mark_connected(session)
session.sendq = nil;
+ if session.resolver then
session.resolver = nil;
session.ip_hosts = nil;
session.srv_hosts = nil;
I'm wondering if a session that is destroyed before reaching the above will leak the session (until the read-timeout).
Pushed the above patch as https://hg.prosody.im/0.10/rev/c46c2942b8fe
While this probably takes care of the majority of cases, I'm not centain that it is a complete fix. Need to investigate what happens if a session fails to connect.