Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57468

Enable TCP_USER_TIMEOUT by default

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • v6.1, v6.0, v5.0, v4.4, v4.2
    • Service Arch 2022-12-26, Service Arch 2022-08-22, Service Arch 2022-09-05, Service Arch 2022-09-19, Service Arch 2022-10-31, Service Arch 2022-11-14, Service Arch 2022-11-28, Service Arch 2022-12-12, Service Arch 2023-01-09, Service Arch 2023-01-23, Service Arch 2023-02-06

      The server should consider enabling TCP_USER_TIMEOUT for the same reasons described in DRIVERS-1692. This solves a problem where an operation could block for ~16 minutes instead of ~5 minutes (the server's default TCP keepalive period).

      If the server does not do this automatically, admins can control this timeout behavior through the net.ipv4.tcp_retries2 setting.

      $ sysctl net.ipv4.tcp_retries2
      net.ipv4.tcp_retries2 = 15
      

      tcp_retries2 - INTEGER
      This value influences the timeout of an alive TCP connection,
      when RTO retransmissions remain unacknowledged.
      Given a value of N, a hypothetical TCP connection following
      exponential backoff with an initial RTO of TCP_RTO_MIN would
      retransmit N times before killing the connection at the (N+1)th RTO.

      The default value of 15 yields a hypothetical timeout of 924.6
      seconds and is a lower bound for the effective timeout.
      TCP will effectively time out at the first RTO which exceeds the
      hypothetical timeout.

      RFC 1122 recommends at least 100 seconds for the timeout,
      which corresponds to a value of at least 8.

      https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: