最近 mysql 从库老是发生错误然后自动重启数据库,比如以下错误:
2017-06-11T10:09:59.977948+08:00 1 [Note] Slave I/O thread killed while reading event for channel ''
2017-06-11T10:09:59.977983+08:00 1 [Note] Slave I/O thread exiting for channel '', read up to log 'mysql-bin.000618', position 749877680
2017-06-11T10:09:59.992965+08:00 0 [Note] Giving 16 client threads a chance to die gracefully
2017-06-11T10:09:59.993028+08:00 0 [Note] Shutting down slave threads
2017-06-11T10:09:59.994228+08:00 2 [Note] Error reading relay log event for channel '': slave SQL thread was killed
2017-06-11T10:10:02.013081+08:00 0 [Note] Forcefully disconnecting 3 remaining clients
。。。。。。
第二种
2017-06-15T11:11:55.948857+08:00 267503 [Warning] Slave SQL for channel '': Worker 0 failed executing transaction 'ANONYMOUS' at master log mysql-bin.000686, end_log_pos 211890878; Could not execute Write_rows event on table sks_lexiangquan.sks_tao_rebate; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log mysql-bin.000686, end_log_pos 211890878, Error_code: 1205
03:11:56 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
。。。。。
然后就自动重启了数据库,释放了内存
重启之后主从自动恢复
但是对线上查询业务有影响,求解惑,已经加大 innodb_lock_wait_timeout
问题是另外还有两台从库却没有出现这种情况,对比了一下相关的参数配置并没有什么不同