Skip to content
  • Michał Kępień's avatar
    Fix idle timeout for connected TCP sockets · 953d704b
    Michał Kępień authored
    When named acting as a resolver connects to an authoritative server over
    TCP, it sets the idle timeout for that connection to 20 seconds.  This
    fixed timeout was picked back when the default processing timeout for
    each client query was hardcoded to 30 seconds.  Commit
    000a8970 made this processing timeout
    configurable through "resolver-query-timeout" and decreased its default
    value to 10 seconds, but the idle TCP timeout was not adjusted to
    reflect that change.  As a result, with the current defaults in effect,
    a single hung TCP connection will consistently cause the resolution
    process for a given query to time out.
    
    Set the idle timeout for connected TCP sockets to half of the client
    query processing timeout configured for a resolver.  This allows named
    to handle hung TCP connections more robustly and prevents the timeout
    mismatch issue from resurfacing in the future if the default is ever
    changed again.
    953d704b