We've had a Flask application using pymssql running for 1.5 years under Python 2.7 and SQL Server 2012. We moved the application to a new set of servers and upgraded the Flask app to Python 3.6 and a new database server to SQL Server 2016. They're both Windows servers.
Since then, we've been getting intermittent 20017 errors:
pymssql.OperationalError(20017, b'DB-Lib error message 20017, severity 9:\nUnexpected EOF from the server (xx.xx.xx.xx:1433)\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (xx.xx.xx.xx:1433)\n')
Only a small percentage of the calls return this, but enough to be causing problems. I can provide specific versions of everything we're running.
One solution proposed is to switch to pyodbc, but we have hundreds of queries and stored procedure calls, many with UUIDs, which pyodbc doesn't handle nearly as cleanly as pymssql.
I've installed pymssql via a precompiled wheel (pymssql-2.1.3-cp36-cp36m-win_amd64) because pip can't build it without an older version.
Any ideas on debugging or fixing this would be helpful.