Hello.
I use a self-compiled Percona Server for Mysql for ARM architecture.
Operating system: Debian 11 (bullseye)
Architecture: aarch64
EC2 instance type: m7g.4xlarge
Percona Server version:
mysql Ver 8.0.32-24 for Linux on aarch64 (Percona Server (GPL), Release '24', Revision 'e5c6e9d2')
Connection id: 2642214
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.32-24 Percona Server (GPL), Release '24', Revision 'e5c6e9d2'
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
UNIX socket: /var/run/mysqld/mysqld.sock
Binary data as: Hexadecimal
Uptime: 7 days 4 hours 22 min 22 sec
Threads: 50 Questions: 491141528 Slow queries: 266 Opens: 55761503 Flush tables: 3 Open tables: 384 Queries per second avg: 791.471
Configuration my.cnf:
my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
default-character-set = utf8mb4
[mysqld_safe]
open-files-limit = 32384
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
open-files-limit = 32384
log_error_verbosity = 2
back_log = 1500
performance_schema = ON
explicit_defaults_for_timestamp = TRUE
secure-file-priv = ""
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
default_authentication_plugin = mysql_native_password
port = 3306
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
user = mysql
basedir = /usr
datadir = /home/db/mysql
tmpdir = /home/db/tmp
skip_external_locking = ON
skip_name_resolve = ON
bind_address = 0.0.0.0
thread_stack = 256K
thread_cache_size = 512
max_allowed_packet = 32M
max_connections = 10000
max_connect_errors = 10000
sync_binlog = 0
innodb_buffer_pool_size = 44G
innodb_file_per_table = 1
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 0
innodb_autoinc_lock_mode = 2
innodb_flush_neighbors = 0
innodb_redo_log_capacity = 1G
innodb_log_group_home_dir = /home/db/mysql
innodb_buffer_pool_dump_at_shutdown = ON
innodb_buffer_pool_load_at_startup = ON
innodb_io_capacity = 2000
innodb_io_capacity_max = 4000
slow_query_log = 1
slow-query-log-file = /home/db/mysql/slow.log
log_error = /home/db/mysql/mysql.err
long_query_time = 1
server_id = 4221
log_replica_updates = ON
binlog_format = ROW
log_bin = binlog
binlog_expire_logs_seconds = 86400
max_binlog_size = 500M
replicate-wild-do-table = foo%.%
replicate-wild-do-table = bar%.%
replicate-wild-do-table = baz%.%
skip-replica-start = ON
relay_log_recovery = ON
gtid_mode = ON
enforce_gtid_consistency = ON
table_open_cache_instances = 64
table_open_cache = 5000
tmp-table-size = 128M
max-heap-table-size = 128M
wait_timeout = 86400
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
default-character-set = utf8mb4
Almost every 1-2 days I get the following replication failure error:
2023-11-22T15:58:24.113662Z 1165057 [ERROR] [MY-010596] [Repl] Error reading relay log event for channel '': corrupted data in log event
2023-11-22T15:58:24.113706Z 1165057 [ERROR] [MY-013121] [Repl] Replica SQL for channel '': Relay log read failure: Could not parse relay log event entry. The possible reasons are: the source's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the replica's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, the server was unable to fetch a keyring key required to open an encrypted relay log file, or a bug in the source's or replica's MySQL code. If you want to check the source's binary log or replica's relay log, you will be able to know their names by issuing 'SHOW REPLICA STATUS' on this replica. Error_code: MY-013121
2023-11-22T15:58:24.113789Z 1165057 [ERROR] [MY-010586] [Repl] Error running query, replica SQL thread aborted. Fix the problem, and restart the replica SQL thread with "START REPLICA". We stopped at log 'binlog.000236' position 260832362
After executing the START REPLICA
command, replication continues.
What was done?
- Checked binlog and relaylog for corruption or errors using mysqlbinlog. All files are intact. No problems were found.
- Tried decreasing the replica_parallel_workers parameter from the default value of 4 to 1. Also increasing it to 8. It didn’t work.
I have 7 other databases with the same settings and they work fine.
I would appreciate any ideas on finding possible causes for this behavior.