From: André Cruz Date: Thu, 15 Feb 2018 16:09:47 +0000 (-0500) Subject: Add ssl "operation timed out" message for psycopg2 X-Git-Tag: rel_1_2_3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f03ec08b5a1c633133c0a38d82b05eb83708f69;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add ssl "operation timed out" message for psycopg2 Added "SSL SYSCALL error: Operation timed out" to the list of messages that trigger a "disconnect" scenario for the psycopg2 driver. Pull request courtesy André Cruz. Change-Id: Ie1a8fc97e74b6906ccacf53dad70fed973c42b7f Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/3 --- diff --git a/doc/build/changelog/unreleased_11/pgssl_timeout.rst b/doc/build/changelog/unreleased_11/pgssl_timeout.rst new file mode 100644 index 0000000000..1916b161ed --- /dev/null +++ b/doc/build/changelog/unreleased_11/pgssl_timeout.rst @@ -0,0 +1,7 @@ +.. change:: + :tags: bug, postgresql + :versions: 1.2.3 + + Added "SSL SYSCALL error: Operation timed out" to the list + of messages that trigger a "disconnect" scenario for the + psycopg2 driver. Pull request courtesy André Cruz. diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 81e1ade8a3..2a949c4430 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -730,6 +730,7 @@ class PGDialect_psycopg2(PGDialect): 'SSL SYSCALL error: Bad file descriptor', 'SSL SYSCALL error: EOF detected', 'SSL error: decryption failed or bad record mac', + 'SSL SYSCALL error: Operation timed out', ]: idx = str_e.find(msg) if idx >= 0 and '"' not in str_e[:idx]: