Open LHCGreg opened 5 years ago
I've never seen this one failing on my setup. What is your setup? Mac/windows/linux? SQL server on same machine or remote (high latency network)?
I usually run on Windows 10 with SQL server running on the same machine. Occasionally run on Mac.
Windows 10, SQL Server running on the same machine. None of the other tests ever give me connection errors.
I could not get it to happen today. It might only happen when on VPN. I'll test again next time I work from home.
I had it happen today on a dev spec'd azure DB. After the first timedout connection it worked fine. Not sure if anything should change for this, but on the first connection for a cold server this may be happening.
This issue is happening intermittently for me and also seems to timeout after only about 1.2 seconds. The documentation says that the default login_timeout
is 15 seconds. Could setting this explicitly improve things?
The SQL Server Logs show this when the error occurs:
The login packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: x.x.x.x]
Here's the stack trace from my client app:
File "/opt/python/pytds/__init__.py", line 1352, in connect
conn._open(sock=sock)
File "/opt/python/pytds/__init__.py", line 379, in _open
self._try_open(timeout=retry_time, sock=sock)
File "/opt/python/pytds/__init__.py", line 361, in _try_open
self._connect(host=host, port=port, instance=instance, timeout=timeout, sock=sock)
File "/opt/python/pytds/__init__.py", line 304, in _connect
route = conn.login(login, sock, self._tzinfo_factory)
File "/opt/python/pytds/tds.py", line 1703, in login
self._main_session.process_prelogin(login)
File "/opt/python/pytds/tds.py", line 1290, in process_prelogin
p = self._reader.read_whole_packet()
File "/opt/python/pytds/tds.py", line 253, in read_whole_packet
self._read_packet()
File "/opt/python/pytds/tds.py", line 230, in _read_packet
received = self._transport.recv_into(self._bufview[pos:], _header.size - pos)
socket.timeout: timed out
You are using old version, new version has a better retry mechanism, try upgrading
Not sure if this is indicative of a real problem or not, but I get occasional failure (maybe 50% of the time) of test_invalid_ntlm_creds due to a socket timeout. Debugging into it I found the timeout seemed to be 1.2 seconds which seems awfully short?