I've a strange problem. A Mariadb replication start failing since this morning. Until today everything works fine from month.

This is my scenario: I've a server in a DC which is the master, and a server in another DC (slave) Mysql port on master is open only for the slave network. Since this morning i've the error:

2023-04-27 11:34:06 484086 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.003150' at position 48850240
2023-04-27 11:34:08 484086 [ERROR] Slave IO thread did not receive an expected Rows-log end-of-statement for event starting at log 'mysql-bin.003150' position 9686234 whose last block was seen at log 'mysql-bin.003150' position 48833684. The end-of-statement should have been delivered before the current one at log 'mysql-bin.003150' position 48850240
2023-04-27 11:34:08 484086 [ERROR] Slave I/O: Relay log write failure: could not queue event from master, Internal MariaDB error code: 1595
2023-04-27 11:34:08 484086 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.003150', position 48850240

Stopped the Mysql slave, start slave and everything works fine for another X time (half an hour, one hour it's quite random)

When I checked with mysqlbinlog I've this output:

/!40019 SET @@session.max_insert_delayed_threads=0/;
mysqlbinlog: File 'mysqld-relay-bin.001306' not found (Errcode: 2 "No such file or directory")

or when I get a real error:

mysqlbinlog: unknown variable 'default-character-set=utf8mb4'

Now the second one I've fixed (I hope!) by adding: [client] loose-default-character-set=utf8mb4

Mariadb version is the same on both master and slave: Ver 15.1 Distrib 10.5.18-MariaDB

I don't know what else i can try. Does anyone have a hint?

  • is sync_binlog set?
    – danblack
    May 2, 2023 at 1:50
  • @danblack Hi Dan, i didn't set the sync_binlog variable. Now i've setted to 0 on the slave and not set on the master. I'll let you know! thank you for now May 2, 2023 at 6:54
  • 1
    Hi guys, i've finally find the cause of the error. Problem was the resources on the hypervisor that provides me the vCPU e vRAM for my virtual machine. They had several i/o stalled by several limitation and that causes mariaDB acting like that. Adding more vCPU and vRAM to our bucket make this error fade aways. Hope that this can help someone else! Sep 8, 2023 at 16:36
  • Thanks for getting back. You could put that comment as answer.
    – danblack
    Sep 8, 2023 at 21:59


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.