Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2281

Ensure KeepAliveTime is set to 120 seconds on Windows

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.11
    • Affects Version/s: None
    • Component/s: None
    • None

      PyMongo may not be setting the tcp KeepAliveTime option correctly on Windows.

      The C driver's Windows keepalive code has some informative comments, in particular:

          * Note that win2k (and seeminly all versions thereafter) do not set the
          * registry value by default so there is no way to derive the default value
          * programmatically. It is however listed in the docs. A user can however
          * change the default value by setting the registry values.
        

      When a registry value is not set, I believe the QueryValueEx call will raise an exception. PyMongo should treat this exception to mean that the system is using the default value (2 *hours* for KeepAliveTime) and reduce the setting to 120 seconds.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: