Redis master-Slave synchronization, always showing the Master_link_status:down solution

Source: Internet
Author: User



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


Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.