我为备份目的设置了多台使用 MySQL 单向复制的服务器。在其中一个奴隶上我有问题。恰好每 10 分钟它就会失去连接并重新连接而不会出现问题。错误日志中的示例:
121216 18:05:49 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000002' at position 782733912
121216 18:05:49 [ERROR] Slave I/O: error reconnecting to master 'repl@127.0.0.1:5002' - retry-time: 60 retries: 86400, Error_code: 2013
121216 18:06:49 [Note] Slave: connected to master 'repl@127.0.0.1:5002',replication resumed in log 'mysql-bin.000002' at position 782733912
121216 18:15:49 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
121216 18:15:49 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000002' at position 822218944
121216 18:15:49 [ERROR] Slave I/O: error reconnecting to master 'repl@127.0.0.1:5002' - retry-time: 60 retries: 86400, Error_code: 2013
121216 18:16:49 [Note] Slave: connected to master 'repl@127.0.0.1:5002',replication resumed in log 'mysql-bin.000002' at position 822218944
121216 18:25:49 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
121216 18:25:49 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000002' at position 850106111
121216 18:25:49 [ERROR] Slave I/O: error reconnecting to master 'repl@127.0.0.1:5002' - retry-time: 60 retries: 86400, Error_code: 2013
因此,一切正常,但错误日志中充斥着消息。
我查看了各种 MySQL 设置,但没有看到任何设置为 10 分钟或 600 秒。
FWIW,复制通过使用 AutoSSH 的 SSH 隧道工作。我查看了 sshd_config,但也没有看到任何超时设置。
我应该查看哪个设置?