mariadb cluster synced but one node shows size=0

Issue

This Content is from Stack Overflow. Question asked by Bartosz

I use mariadb 10.5 with galera 4. I have a 3 node cluster which worked perfectly for the past 6 months. Lately I have been having problems with very cpu intensive query and had to kill that process. One of the nodes (n1) went out of sync so I recreated it. Everything synced perfectly but since that day n1 shows wsrep_cluster_size=0 and the rest of them show wsrep_cluster_size=3.
After a couple of days I decided to stop n2 and n3 to recreate it from n1. Again everything went smoothly but now n3 shows wsrep_cluster_size=0 and n1,n2 show wsrep_cluster_size=3.
I have no idea what’s going on. I’ve checked all the logs and manually checked all the tables and everything seems ok. Data is synced and database is working just fine.

Heres is my configuration

[mysqld]

binlog_format                       = ROW
bind-address                        = 0.0.0.0

# Galera Provider Configuration

wsrep_on                            = ON
wsrep_provider                      = /usr/lib/galera/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name                  = cluser


wsrep_cluster_address               = gcomm://10.0.0.2,10.0.0.3,10.0.0.4
wsrep_node_address                  = 10.0.0.2
wsrep_node_name                     = n1

# Galera Synchronization Configuration

wsrep_sst_method                    = rsync

log_error                           = /var/lib/mysql/node.log

default_storage_engine              = InnoDB
innodb_autoinc_lock_mode            = 2
innodb_locks_unsafe_for_binlog      = 1
innodb_file_per_table               = 1
#innodb_thread_concurrency          = 0
innodb_buffer_pool_size             = 10G
#innodb_log_buffer_size             = 64M
innodb_flush_method                 = O_DIRECT
innodb_log_file_size                = 2G
innodb_log_files_in_group           = 2
wsrep_slave_threads                 = 5
innodb_locks_unsafe_for_binlog      = 1
innodb_autoinc_lock_mode            = 2

skip-name-resolve

lc-messages-dir                     = /usr/share/mysql
skip-external-locking
key_buffer_size                     = 16M
max_connections                     = 300
wait_timeout                = 20
max_allowed_packet                  = 16M
thread_stack                        = 192K
thread_cache_size                   = 8

# * Query Cache Configuration
#
query_cache_limit                   = 1M
query_cache_size                    = 16M

expire_logs_days                    = 10
max_binlog_size                     = 100M



Solution

Check the Answers

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?