From 55bd3b0535d76e6aae3c1afad27cf7edfc1d8fc9 Mon Sep 17 00:00:00 2001 From: Ken Robbins Date: Wed, 14 Sep 2016 15:13:30 -0400 Subject: [PATCH] Add "message 20017" (unexpected EOF from the server) to mssql. Fixes: #3791 Change-Id: I0dade4fe0ecbb53b4a66881594f362986ba73ae8 Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/89 (cherry picked from commit 285d7bbb3e11abdc9a931e35e4ee08ef611af5d4) --- doc/build/changelog/changelog_10.rst | 9 +++++++++ lib/sqlalchemy/dialects/mssql/pymssql.py | 1 + 2 files changed, 10 insertions(+) diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst index d726435cf8..0e41842334 100644 --- a/doc/build/changelog/changelog_10.rst +++ b/doc/build/changelog/changelog_10.rst @@ -18,6 +18,15 @@ .. changelog:: :version: 1.0.16 + .. change:: + :tags: bug, mssql + :tickes: 3791 + :versions: 1.1.0 + + Added error code 20017 "unexpected EOF from the server" to the list of + disconnect exceptions that result in a connection pool reset. Pull + request courtesy Ken Robbins. + .. change:: :tags: bug, orm.declarative :tickets: 3797 diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index 32e3bd9226..380418b334 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -87,6 +87,7 @@ class MSDialect_pymssql(MSDialect): "Not connected to any MS SQL server", "Connection is closed", "message 20006", # Write to the server failed + "message 20017", # Unexpected EOF from the server ): if msg in str(e): return True -- 2.47.3