-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- related to
-
PYTHON-1279 Have TCP keepalive default to true
- Closed
-
PYTHON-2255 Reduce default keepalive time to align with Azure defaults
- Closed