On our redis replication with sentinel using 3 nodes, we have issue with error below in slave each time the redis sync RDB files;
==
5550:S 16 Apr 2021 19:58:53.654 # I/O error trying to sync with MASTER: connection lost
==
Replication info shows
==
127.0.0.1:6379> info replication
Replication
role:master
connected_slaves:2
slave0:ip=10.200.200.126,port=6379,state=wait_bgsave,offset=0,lag=-1
slave1:ip=10.200.200.125,port=6379,state=wait_bgsave,offset=0,lag=-1

==
On the redis master, the log shows;
==
28847:M 16 Apr 2021 20:17:21.239 # Slave 10.200.200.125:6379 correctly received the streamed RDB file.
28847:M 16 Apr 2021 20:17:59.732 # Client id=574122305 addr=10.200.200.125:38180 fd=182 name= age=121 idle=1 flags=S db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=16167 oll=7443 omem=2165680584 events=r cmd=psync scheduled to be closed ASAP for overcoming of output buffer limits.
28847:M 16 Apr 2021 20:17:59.737 # Connection with replica 10.200.200.125:6379 lost.

==

Based on the log i have tried adjusted the client utuput buffer limit with unlimited but the result is the same
==
redis-cli> config set client-output-buffer-limit “0 0 0”
==

The fix is to adjust gradually the size of the buffer hard/soft limit and the timeout for the slave class
The format is
==
client-output-buffer-limit <class> <hard limit> <soft limit> <soft second>
==

In my case the successful value is
==
redis-cli>config set client-output-buffer-limit “slave 2147483648 2147483648 120”
==

Hope this help you also with your redis cluster.

IDCloudHost | SSD Cloud Hosting Indonesia



Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *