From ab6946769742602e40fb9ed9dde5f642885d1906 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 30 Nov 2015 13:15:40 -0500 Subject: [PATCH] - Added the error "20006: Write to the server failed" to the list of disconnect errors for the pymssql driver, as this has been observed to render a connection unusable. fixes #3585 --- doc/build/changelog/changelog_10.rst | 9 +++++++++ lib/sqlalchemy/dialects/mssql/pymssql.py | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst index 048f0b70a5..5b66baf97e 100644 --- a/doc/build/changelog/changelog_10.rst +++ b/doc/build/changelog/changelog_10.rst @@ -18,6 +18,15 @@ .. changelog:: :version: 1.0.10 + .. change:: + :tags: bug, mssql + :tickets: 3585 + :versions: 1.1.0b1 + + Added the error "20006: Write to the server failed" to the list + of disconnect errors for the pymssql driver, as this has been observed + to render a connection unusable. + .. change:: :tags: bug, postgresql :pullreq: github:216 diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index 324b3770c2..1d7635c7f9 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -85,7 +85,8 @@ class MSDialect_pymssql(MSDialect): "message 20003", # connection timeout "Error 10054", "Not connected to any MS SQL server", - "Connection is closed" + "Connection is closed", + "message 20006", # Write to the server failed ): if msg in str(e): return True -- 2.47.2