Bug #80238 Large queries fail with error "mysql.connector.errors.OperationalError: 2055"
Description:
Using the Python MySQL connector I notice that any large query I submit seems to fail with the following error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/network.py", line 212, in send_compressed
self.sock.sendall(zip_packet)
BlockingIOError: [Errno 35] Resource temporarily unavailable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 921, in _bootstrap_inner
self.run()
File "/Users/maldeiri/raw_data_processing/sql_retriever.py", line 22, in run
self.mysql_cursor.execute(self.sql_statement)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/cursor.py", line 515, in execute
self._handle_result(self._connection.cmd_query(stmt))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/connection.py", line 488, in cmd_query
result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/connection.py", line 261, in _send_cmd
packet_number)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/network.py", line 215, in send_compressed
errno=2055, values=(self.get_address(), _strioerror(err)))
mysql.connector.errors.OperationalError: 2055: Lost connection to MySQL server at 'database_end_point:3306', system error: 35 Resource temporarily unavailable
I have tried using the compress flag setting it to both true and false, however this doesn't resolve the problem.
I know this is a problem with the connector as using the pymysql library doesn't cause any errors for the same queries, client machine and Database.
How to repeat:
Create very large Select statements, for example "select * from table_1 where column_1 in (val_1, val_2.... val_350,000)"
As I mentioned this only seems to happen when using the MySQL connector and doesn't happen with other libraries.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.060 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Using the Python MySQL connector I notice that any large query I submit seems to fail with the following error: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/network.py", line 212, in send_compressed self.sock.sendall(zip_packet) BlockingIOError: [Errno 35] Resource temporarily unavailable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 921, in _bootstrap_inner self.run() File "/Users/maldeiri/raw_data_processing/sql_retriever.py", line 22, in run self.mysql_cursor.execute(self.sql_statement) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/cursor.py", line 515, in execute self._handle_result(self._connection.cmd_query(stmt)) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/connection.py", line 488, in cmd_query result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query)) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/connection.py", line 261, in _send_cmd packet_number) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mysql/connector/network.py", line 215, in send_compressed errno=2055, values=(self.get_address(), _strioerror(err))) mysql.connector.errors.OperationalError: 2055: Lost connection to MySQL server at 'database_end_point:3306', system error: 35 Resource temporarily unavailable I have tried using the compress flag setting it to both true and false, however this doesn't resolve the problem. I know this is a problem with the connector as using the pymysql library doesn't cause any errors for the same queries, client machine and Database. How to repeat: Create very large Select statements, for example "select * from table_1 where column_1 in (val_1, val_2.... val_350,000)" As I mentioned this only seems to happen when using the MySQL connector and doesn't happen with other libraries.