Using pt-table-sync I keep getting MySQL server has gone away [for Statement “SET NAMES ‘utf8mb4’”] at line 10755 while doing dbname.large_table_name on hostname.
Any ideas appreciated. Thanks!
I am using percona-toolkit version. percona-toolkit.x86_64 0:3.5.7-1.el7
The master server is mysql version 8.0.21-12
The slave server is mysql version 8.0.32-24
Do they need to be the same or a similar version?
The pt-table-sync statement being executed on the master is:
pt-table-sync --verbose --sync-to-master h=remote_server_name,u=username,p=passwd,P=port --tables large_table_name --execute
wait_timeout = 259200 seconds which is 3 days.
Replication is not behind.
Show Processlist displays “waiting for replica to advance” statement for a few seconds at a time, and then runs a select statement.
STATE: Waiting for the replica SQL thread to advance position
INFO: SELECT MASTER_POS_WAIT('bin-log.004755', 772425617, 60 )
INFO: SELECT /*server_name.large_table_name:32469/69782*/ 32468 AS chunk_num, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `field1`,`field2`,`field3`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `databasename`.`field1`,`field2`,`field3` FORCE INDEX (`PRIMARY`) WHERE (``field1_id` >= '65161270' AND `field2_id` < '65163277') LOCK IN SHARE MODE
1 row in set (0.00 sec)
The output is this info below. It appears it ran for about 9 hours before failing?
# DELETE REPLACE INSERT UPDATE ALGORITHM START END EXIT DATABASE.TABLE
# 0 0 0 0 Chunk 00:28:53 08:19:01 0 large_table_name
MySQL server has gone away [for Statement "SET NAMES 'utf8mb4'"] at line 10755 while doing dbname.large_table_name on servername