A few days ago, after modifying a slave node's Redis listening port, it restarted the next Redis and found Master_link_status: it has been down for a long time.
Viewed the Redis logs and found a lot of "I/O error trying to sync with Master:connection lost" in the log
Baidu, the discovery is client-output-buffer-limit slave This parameter configuration caused by improper.
Related instructions found on the Internet:
# If this parameter is too small, the error log will show I/O error trying to sync Withmaster:connection lost '
# This is to be responsible for sending data to slave's client, if buffer more than 256m or 60 seconds in a row more than 64m, will be immediately forcibly closed!!! Traffic big words must be set a little bigger. Otherwise there will be a very tragic cycle, master transmission of a large RDB to slave,slave efforts to load, but not loaded, master to the client cache full, and then again.
Workaround:
# redis-cli-a ' xxxxxxx ' Connected to Redis server
> Config set client-output-buffer-limit slave1024mb 256MB 0 This dynamically modifies the next parameter, saving the restart of Redis, causing the data to synchronize again.
Wait a moment, Executive > Info replication
If Master_link_status becomes up, it means that our configuration is in effect.
Then, you have to modify the settings inside the redis.conf, so that after you restart Redis, the modified client-output-buffer-limit configuration is lost.
Redis master-Slave synchronization, always showing the Master_link_status:down solution