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

Ensure KeepAliveTime is set to 120 seconds on Windows

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.11
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: