]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
doq: really configure idleTimeout
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Fri, 22 Sep 2023 12:23:48 +0000 (14:23 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 Oct 2023 11:37:56 +0000 (13:37 +0200)
pdns/dnsdist-lua.cc
pdns/dnsdistdist/docs/reference/config.rst
pdns/dnsdistdist/doq.cc
pdns/dnsdistdist/doq.hh

index e04f3ca20d27fc0e3eec59c9debb8e4aa10f35e3..eccb9a936351a77c3832ab963fa7786576b1aa9d 100644 (file)
@@ -2512,6 +2512,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
       parseLocalBindVars(vars, reusePort, tcpFastOpenQueueSize, interface, cpus, tcpListenQueueSize, maxInFlightQueriesPerConn, tcpMaxConcurrentConnections);
 
       getOptionalValue<int>(vars, "internalPipeBufferSize", frontend->d_internalPipeBufferSize);
+      getOptionalValue<int>(vars, "idleTimeout", frontend->d_idleTimeout);
 
       parseTLSConfig(frontend->d_tlsConfig, "addDOQLocal", vars);
 
index fbb8e73f77645ce30b9a5aa269760b2c5bffe0c4..c0a3287f4187b67d7557a42cacec281065319986 100644 (file)
@@ -188,7 +188,7 @@ Listen Sockets
   * ``reusePort=false``: bool - Set the ``SO_REUSEPORT`` socket option.
   * ``interface=""``: str - Set the network interface to use.
   * ``cpus={}``: table - Set the CPU affinity for this listener thread, asking the scheduler to run it on a single CPU id, or a set of CPU ids. This parameter is only available if the OS provides the pthread_setaffinity_np() function.
-  * ``idleTimeout=30``: int - Set the idle timeout, in seconds.
+  * ``idleTimeout=5``: int - Set the idle timeout, in seconds.
   * ``internalPipeBufferSize=0``: int - Set the size in bytes of the internal buffer of the pipes used internally to pass queries and responses between threads. Requires support for ``F_SETPIPE_SZ`` which is present in Linux since 2.6.35. The actual size might be rounded up to a multiple of a page size. 0 means that the OS default size is used. The default value is 0, except on Linux where it is 1048576 since 1.6.0.
 
 .. function:: addTLSLocal(address, certFile(s), keyFile(s) [, options])
index a1ce4c647837fd3b1268045a5d3b7525b9598662..6f6d0496eee158e0f6df8020247ff0996e8fb2d8 100644 (file)
@@ -287,7 +287,7 @@ void DOQFrontend::setup()
     }
   }
 
-  quiche_config_set_max_idle_timeout(config.get(), 5000);
+  quiche_config_set_max_idle_timeout(config.get(), d_idleTimeout * 1000);
   quiche_config_set_max_recv_udp_payload_size(config.get(), MAX_DATAGRAM_SIZE);
   quiche_config_set_max_send_udp_payload_size(config.get(), MAX_DATAGRAM_SIZE);
   quiche_config_set_initial_max_data(config.get(), 10000000);
index c2ebb685e3a0250ca5c37859256c9f6638cfe96c..9cd69fe928dbbace421da8a0e5b64fa1d21f37ef 100644 (file)
@@ -52,6 +52,7 @@ struct DOQFrontend
 #else
   uint32_t d_internalPipeBufferSize{0};
 #endif
+  uint64_t d_idleTimeout{5};
 };
 
 struct DOQUnit