-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
On Windows, attempted connections to the wrong address can take 1-2s to fail. I observed this when connecting to a mongod that was not bound to IPv6 (i.e. no --ipv6 flag passed).
For single-threaded monitoring, this is mitigated by happy eyeballs. But for establishing multi-threaded application connections, this could appear as a 1-2s block. After CDRIVER-3625, this will also effect multi-threaded monitoring.
With some added debug logging, the delay occurs in the call to "select" here: https://github.com/mongodb/mongo-c-driver/blob/master/src/libmongoc/src/mongoc/mongoc-socket.c#L207
Capturing traffic with wireshark shows repeated TCP retransmits (capture file attached).
This branch includes more logging and a simplified example-client to reproduce: https://github.com/kevinAlbs/mongo-c-driver/tree/slow-select
- is related to
-
PYTHON-356 Windows localhost connection slowdowns.
- Closed
- related to
-
CDRIVER-3965 Version 1.17.5 adds a 4 seconds delay on each query
- Closed