[MySQL] zombie dump threads対処法

MySQLを5.6から5.7にアップデートしたら、MySQLログに以下のメッセージが記録されるようになった。レプリケーションしているマスター側のログのみに記録されている。

/var/log/mysqld.log

2020-07-24T03:39:03.790695+09:00 363 [Note] Start binlog_dump to master_thread_id(363) slave_server(369034799), pos(mysql-bin.000018, 70234)
2020-07-24T03:40:03.896291+09:00 366 [Note] While initializing dump thread for slave with UUID <be434b09-3c76-11ea-b276-0e1a567dc58c>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(363).
2020-07-24T03:40:03.896398+09:00 366 [Note] Start binlog_dump to master_thread_id(366) slave_server(369034799), pos(mysql-bin.000018, 70234)
2020-07-24T03:41:04.019671+09:00 369 [Note] While initializing dump thread for slave with UUID <be434b09-3c76-11ea-b276-0e1a567dc58c>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread(366).

ネットを検索すると同じ現象がヒットした。

replication – MySQL Zombie Dump threads – Stack Overflow
https://stackoverflow.com/questions/38500713/mysql-zombie-dump-threads

MySQL :: MySQL Zombie Dump threads.
https://forums.mysql.com/read.php?26,648406,648406#msg-648406

記事によれば、slave_net_timeオプション(スレーブがマスターからのデータを待機する時間)の規定値が、MySQL 5.6では3600秒だったのが、MySQL 5.7では60秒に変更されているらしい。

おそらくウチの構成だと60秒では短すぎるのだろう。スレーブ側でMySQL 5.6の規定値だった3600に設定しなおしたら解決。とりあえずこれでしばらく様子を見る。

参考サイト

第75回 MySQLのさまざまなタイムアウトオプションについて:MySQL道普請便り|gihyo.jp … 技術評論社
https://gihyo.jp/dev/serial/01/mysql-road-construction-news/0075