danfengcao / binlog2sql

Parse MySQL binlog to SQL you want
GNU General Public License v3.0
3.32k stars 1.04k forks source link

为什么解析一段时间后就Lost connection to MySQL? #41

Open Fanduzi opened 6 years ago

Fanduzi commented 6 years ago

Traceback (most recent call last): File "binlog2sql.py", line 150, in binlog2sql.process_binlog() File "binlog2sql.py", line 121, in process_binlog self.print_rollback_sql(filename=tmp_file) File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 844, in exit self.commit() File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 788, in commit self._read_ok_packet() File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 767, in _read_ok_packet pkt = self._read_packet() File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 987, in _read_packet packet_header = self._read_bytes(4) File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1033, in _read_bytes CR.CR_SERVER_LOST, "Lost connection to MySQL server during query") pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')

Fanduzi commented 6 years ago

image MySQL为Percona 5.7.14-7-log