服務器:Vmware 虛擬機
作業系統:Centos7.4
cpu:2 * 8 = 16cores
mem:32G
磁盤:1T
mysql version:5.7.25
描述:
MGR單主模式,每個節點配置了權重,按照1,2,3的順序依次遞減。使用keepalived生成vip,也配置了和MGR一致的權重。
業務通過vip訪問資料庫,還有一個從庫,通過vip從MGR主節點復制資料。程式端有很多定時任務,其中兩個任務分別是每十分鐘抽取一次資料插入到庫中,一次15000條,另一個任務是每半小時一次,每次25000條資料,寫入到庫中。每個任務都做了事務控制,每100條提交一次。目前資料庫innodb status中顯示not young數量比較多。
最近出現集群節點被驅逐的問題,errorlog中顯示是網路錯誤導致節點被驅逐。但是監控中,只看到網路質量比較差,延遲有時會出現30多ms的情況。并未出現網路中斷。
errolog:
2019-08-16T23:20:07.669964+08:00 0 [Warning] Plugin group_replication reported: 'Member with address sha11xxdb03:3306 has become unreachable.'
2019-08-16T23:20:07.687859+08:00 0 [Warning] Plugin group_replication reported: 'Member with address sha11xxdb01:3306 has become unreachable.'
2019-08-16T23:20:07.687926+08:00 0 [ERROR] Plugin group_replication reported: 'This server is not able to reach a majority of members in the group. This server will now block all updates. The server will remain blocked for the next 300 seconds. Unless contact with the majority is restored, after this time the member will error out and leave the group. It is possible to use group_replication_force_members to force a new group membership.'
2019-08-16T23:20:08.399913+08:00 0 [ERROR] Plugin group_replication reported: 'Member was expelled from the group due to network failures, changing member status to ERROR.'
mgr中對事務做了限制,每個事務不能超過10M,并且對io_capacity和io_capacity_max做了限制,分別是300和600。innodb_lru_scan_depth=256。
請問有沒有遇到過此問題的朋友,希望幫忙指點一下,或者有思路也請指導一下。被這個問題困擾了很久了
另外,當vip從primary漂移到secondary上時,從庫不能自動切換到新主節點上繼續復制資料,注:從庫是通過vip進行同步的
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/51351.html
標籤:MySQL
