]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: extend various timeouts
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Feb 2017 18:56:59 +0000 (19:56 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 09:25:16 +0000 (10:25 +0100)
Let's increase a number of timeouts as they apparently are too short for
some real-world lookups.

See:

https://github.com/systemd/systemd/issues/4003#issuecomment-279842616

In particular we change the following timeouts:

1) The first UDP retry we increase 500ms → 750ms. This is a good idea,
   since some servers need relatively long responses for trivial lookups,
   and giving up our first attempt also has the effect of trying a
   different server for the next attempt which has the side effect that
   we'll run two down-grade iterations in parallel, on both servers.
   Hence, let's give servers a bit more time in the first iteration.

2) Permit 24 retries instead of just 16 per transactions. If we end up
   downgrading all the way down to UDP for a lookup we already need 5
   iterations for that. If we want permit a couple of lost packages for
   each (let's say 4), then we already need 20 iterations.

3) Increase the overall query timeout on the service side to 60s (from
   45s), simply because very long and slow DNSSEC + CNAME chains (such as
   us.ynuf.alipay.com) hit this boundary too easily. The client side
   timeout for the bus method call is increased to 90s, in order to have
   room for the dbus reply to go through

src/resolve/resolve-tool.c
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-transaction.h

index 3cec36817aa3ff7090e1e6ac3bf1f2c21e348921..32537ce6e8acb6db5f24fb7de931ee5bb44148df 100644 (file)
@@ -38,7 +38,7 @@
 #include "strv.h"
 #include "terminal-util.h"
 
-#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
+#define DNS_CALL_TIMEOUT_USEC (90*USEC_PER_SEC)
 
 static int arg_family = AF_UNSPEC;
 static int arg_ifindex = 0;
index 0dfe9320b5d948194c11c451ef8e642eda058757..2b091e6c45dc57856abc7eabd754f77150efe4d4 100644 (file)
@@ -28,7 +28,7 @@
 #include "string-util.h"
 
 /* How long to wait for the query in total */
-#define QUERY_TIMEOUT_USEC (30 * USEC_PER_SEC)
+#define QUERY_TIMEOUT_USEC (60 * USEC_PER_SEC)
 
 #define CNAME_MAX 8
 #define QUERIES_MAX 2048
index 2df917e61e1874ae954320b63681ea50e540e0d7..5498f7b9cbdcd0f985f626a9652a64b16383b857 100644 (file)
@@ -28,7 +28,7 @@
 #include "string-util.h"
 
 /* After how much time to repeat classic DNS requests */
-#define DNS_TIMEOUT_MIN_USEC (500 * USEC_PER_MSEC)
+#define DNS_TIMEOUT_MIN_USEC (750 * USEC_PER_MSEC)
 #define DNS_TIMEOUT_MAX_USEC (5 * USEC_PER_SEC)
 
 /* The amount of time to wait before retrying with a full feature set */
index c4fb51958db03a57472d56c8326ecbdfcf93c9e4..a8d97738efcd89fc70788dd15b037fe2c1253bc0 100644 (file)
@@ -178,7 +178,7 @@ DnsTransactionSource dns_transaction_source_from_string(const char *s) _pure_;
 #define MDNS_PROBING_INTERVAL_USEC (250 * USEC_PER_MSEC)
 
 /* Maximum attempts to send DNS requests, across all DNS servers */
-#define DNS_TRANSACTION_ATTEMPTS_MAX 16
+#define DNS_TRANSACTION_ATTEMPTS_MAX 24
 
 /* Maximum attempts to send LLMNR requests, see RFC 4795 Section 2.7 */
 #define LLMNR_TRANSACTION_ATTEMPTS_MAX 3