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

Set TCP_KEEPIDLE and TCP_KEEPINTVL (or OS equivalent) whenever available

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.13
    • Component/s: Networking
    • Labels:
    • Backwards Compatibility:
      Minor Change
    • Sprint:
      Platforms 2017-09-11

      Description

      The server currently enables SO_KEEPALIVE on sockets whenever it is defined. On Linux it goes the extra mile and attempts to set a reasonable value for TCP_KEEPIDLE and TCP_KEEPINTVL (the default TCP_KEEPIDLE value on Linux - and keep-alive timeout on Windows - is a completely useless 7200 seconds).

      The server should attempt to set a reasonable value for TCP_KEEPIDLE and TCP_KEEPINTVL whenever they are defined, not just on Linux. It should also attempt to set the equivalent values on Windows using WSAIoctl.

      References:
      https://github.com/mongodb/mongo/blob/master/src/mongo/util/net/sock.cpp#L153-L193
      http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#setsockopt
      https://msdn.microsoft.com/en-us/library/windows/desktop/dd877220(v=vs.85).aspx

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sara.golemon Sara Golemon
              Reporter:
              behackett Bernie Hackett
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: