Closed johnarnold closed 5 years ago
I am having the same issue on the BrokenPipeError exception bubbling up.
...
result = self.conn.execute(query, emp_id=employee_id).fetchone()
File \"/var/task/sqlalchemy/engine/base.py\", line 945, in execute
return meth(self, multiparams, params)
File \"/var/task/sqlalchemy/sql/elements.py\", line 263, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File \"/var/task/sqlalchemy/engine/base.py\", line 1053, in _execute_clauseelement
compiled_sql, distilled_params
File \"/var/task/sqlalchemy/engine/base.py\", line 1189, in _execute_context
context)
File \"/var/task/sqlalchemy/engine/base.py\", line 1405, in _handle_dbapi_exception
util.reraise(*exc_info)
File \"/var/task/sqlalchemy/util/compat.py\", line 187, in reraise
raise value
File \"/var/task/sqlalchemy/engine/base.py\", line 1182, in _execute_context
context)
File \"/var/task/sqlalchemy/engine/default.py\", line 470, in do_execute
cursor.execute(statement, parameters)
File \"/var/task/pg8000/core.py\", line 851, in execute
self._c.execute(self, \"begin transaction\", None)
File \"/var/task/pg8000/core.py\", line 1812, in execute
self._flush()
File \"/var/lang/lib/python3.6/socket.py\", line 604, in write
return self._sock.send(b)
BrokenPipeError: [Errno 32] Broken pipe
Possible regression of https://github.com/mfenniak/pg8000/issues/73 and https://github.com/mfenniak/pg8000/commit/97b712a6e4ab00ee48ce9872caae2eead77cea99
It looks like the current code no longer catches socket.error.
Getting BrokenPipeError socket exception bubbling up: