-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.6, 3.6.1
-
Component/s: Connection Mgmt
-
None
-
Fully Compatible
Current non-SSL default (no timed out in error string) behaviour is if there is a socket error then an AutoReconnect is raised.
With SSL, there are moments where there are temporal network issues that can cause the SSL handshack to fail. This is raised as a ConnectionFailure but should be reclassified as an AutoReconnect.
For example here:
File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 891, in get_socket sock_info = self._get_socket_no_auth() File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 931, in _get_socket_no_auth sock_info = self._check(sock_info) File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 983, in _check return self.connect() File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 842, in connect sock = _configured_socket(self.address, self.opts) File "/opt/ampli/apps/marvinweb/venv/lib/python2.7/site-packages/pymongo/pool.py", line 758, in _configured_socket raise ConnectionFailure("SSL handshake failed: %s" % (str(exc),)) ConnectionFailure: SSL handshake failed: _ssl.c:495: The handshake operation timed out
This can happen when the network, for whatever reason, is temporarily unavailable, during the connection process. This could be solved by raising an AutoReconnect instead.
- is related to
-
PYTHON-1585 Audit all internal uses of ConnectionFailure and AutoReconnect
- Closed