You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An ECONNRESET error (ProtocolError) is usually a retryable error, seen here. If the ECONNRESET error occurs at a certain point in the request the retryable ProtocolError is wrapped in an unhandled ChunkedEncodingError. I'd like to add the ChunkedEncodingError to the list of retryable errors
Can you set logging to DEBUG and collect the logs?
25/01/30 16:38:15 ERROR ProcessLauncher: Error from Python:Traceback (most recent call last):
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py", line 318, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/home/spark/.local/lib/python3.10/site-packages/OpenSSL/SSL.py", line 2268, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/home/spark/.local/lib/python3.10/site-packages/OpenSSL/SSL.py", line 1962, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 444, in _error_catcher
yield
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 828, in read_chunked
self._update_chunk_length()
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 758, in _update_chunk_length
line = self._fp.fp.readline()
File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py", line 323, in recv_into
raise SocketError(str(e))
OSError: (104, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/requests/models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 624, in stream
forlinein self.read_chunked(amt, decode_content=decode_content):
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 816, in read_chunked
with self._error_catcher():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/urllib3/response.py", line 461, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
snowflake.connector.vendored.urllib3.exceptions.ProtocolError: ('Connection broken: OSError("(104, \'ECONNRESET\')")', OSError("(104, 'ECONNRESET')"))During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 1344, in <module> main( File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 1263, in main raise exc File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 1250, in main exceptions = handler.load_tables_to_mrg( File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 1121, in load_tables_to_mrg future.result() File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 439, in result return self.__get_result() File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result raise self._exception File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 753, in load_to_mrg self.load_to_s3(executor=s3_executor, handler=handler, cursor=cursor) File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 724, in load_to_s3 set_jc_load_status_post_s3_load( File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 221, in set_jc_load_status_post_s3_load insert_into_jc_process_log( File "/tmp/GW_S3_to_Snowflake_MRG_prod.py", line 158, in insert_into_jc_process_log cursor.execute( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/cursor.py", line 994, in execute ret = self._execute_helper(query, **kwargs) File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/cursor.py", line 700, in _execute_helper ret = self._connection.cmd_query( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/connection.py", line 1368, in cmd_query ret = self.rest.request( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 501, in request return self._post_request( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 749, in _post_request ret = self.fetch( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 864, in fetch ret = self._request_exec_wrapper( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 992, in _request_exec_wrapper raise e File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 914, in _request_exec_wrapper return_object = self._request_exec( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 1191, in _request_exec raise err File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/network.py", line 1081, in _request_exec raw_ret = session.request( File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/requests/sessions.py", line 747, in send r.content File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/requests/models.py", line 899, in content self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" File "/home/spark/.local/lib/python3.10/site-packages/snowflake/connector/vendored/requests/models.py", line 818, in generate raise ChunkedEncodingError(e)snowflake.connector.vendored.requests.exceptions.ChunkedEncodingError: ('Connection broken: OSError("(104, \'ECONNRESET\')")', OSError("(104, 'ECONNRESET')"))
The text was updated successfully, but these errors were encountered:
@sfc-gh-sghosh , thanks for reaching out! Reproducing this issue is difficult. We have the same code deployed in a number of environments but we're only seeing it regularly in the highest volume environment. We're using concurrent.futuresThreadPoolExecutor with 20 workers to execute a three sequential stored procedure in parallel for ~8,000 tables. We're running this job every hour of the business day and it succeeds most times. All that so say that the failure rate is very low and we haven't been able to discern a pattern.
Have you configured any timeout such as login_timeout, network_timeout, socket_timeout ?
I can't say that I have. Would a socket timeout influence a ECONNRESET error? I'm under the impression that this isn't a delay or latency issue but a forceful termination of the socket on the receiver.
What is the value of parameter MAX_CON_RETRY_ATTEMPTS in your account ?
I understand this to be an environment variable, not an account parameter. We don't set this environment variable. When I run SHOW PARAMETERS LIKE 'MAX_CON_RETRY_ATTEMPTS', I don't get any results. SHOW PARAMETERS LIKE 'MAX_CON_RETRY_ATTEMPTS' IN ACCOUNT also returns no values.
Python version
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Operating system and processor architecture
Windows-10-10.0.19045-SP0
Installed packages
What did you do?
An ECONNRESET error (ProtocolError) is usually a retryable error, seen here. If the ECONNRESET error occurs at a certain point in the request the retryable ProtocolError is wrapped in an unhandled ChunkedEncodingError. I'd like to add the ChunkedEncodingError to the list of retryable errors
Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: