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

Set TCP_KEEPIDLE and TCP_KEEPINTVL (or OS equivalent) whenever available

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.13
    • Affects Version/s: None
    • Component/s: Networking
    • Minor Change
    • Platforms 2017-09-11

      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

            Assignee:
            sara.golemon@mongodb.com Sara Golemon
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: