redis版本为6.0.6,重启备机后数据同步失败。
查看主机info发现状态一直在bg_save和send_bulk中切换。
查看主机redis.log,出现Client ... scheduled to be closed ASAP for overcoming of output buffer limits.
查看从机redis.log,出现 I/O error trying to sync with MASTER: connection lost
此错误由缓冲区配置,即client-output-buffer-limit配得太小造成。可将client-output-buffer-limit slave(也作client-output-buffer-limit replica)的限制去除。
主从机均需修改以下配置:
1. 打开redis.conf,将replica/slave后三个参数置零
# vi redis.conf
# By default normal clients are not limited because they don't receive data
# without asking (in a push way), but just after a request, so only
# asynchronous clients may create a scenario where data is requested faster
# than it can read.
#
# Instead there is a default limit for pubsub and replica clients, since
# subscribers and replicas receive data in a push fashion.
#
# Both the hard or the soft l