[MDEV-33122]  Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event Created: 2023-12-26  Updated: 2023-12-26

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 5.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: thejaraj Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: crash
Environment:

5.5.68-MariaDB MariaDB Server



 Description   

Hi Team,

i'm getting the frequent errors of below in slave node, kindly help me to update the configuration file on slave

Error message getting on slave server:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event 'master-bin.057804' at 718417804, the last event read from 'master-bin.062834' at 935584838, the last byte read from 'master-bin.062834' at 935584857.'

Mention binglog file is not present as we have seted up the binlog retention policy to 1 day. Please check and kindly help us to find the root cause and permanent solution of this error.

cat /etc/my.cnf.d/server.cnf

  1. These groups are read by MariaDB server.
  2. Use it for options that only the server (but not clients) should see
  3. See the examples of server my.cnf files in /usr/share/mysql/
  1. this is read by the standalone daemon and embedded servers
    [server]
  1. this is only for the mysqld standalone daemon
    [mysqld]
  2. -------------------------------------------------
  3. GENERAL SYSTEM SETTINGS
  4. -------------------------------------------------
    port = 3306
    socket = /var/lib/mysql/mysql.sock
    skip-external-locking
    sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    innodb_file_format=barracuda
    innodb_large_prefix=1
    innodb_file_per_table=1
  1. -------------------------------------------------
  2. You don't typically have to change these
  3. -------------------------------------------------
    #max_allowed_packet = 18M
    #max_allowed_packet=128M
    #max_allowed_packet=512M
    max_allowed_packet=950M
    table_cache = 600
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 8M
    thread_cache_size = 32
  1. -------------------------------------------------
  2. for db replication
  3. -------------------------------------------------
    server-id = 2
    binlog-format = mixed
    relay_log = master-relay-bin
    #slave-skip-errors=1032
  1. -------------------------------------------------
  2. put table which need to be replicate
  3. -------------------------------------------------
    #replicate_do_table=cacti.grid_jobs
    #replicate_do_table=cacti.grid_jobs_finished
    #replicate-wild-do-table=cacti.grid_jobs_finished_%
  1. -------------------------------------------------
  2. This will help with frequently asked questions
  3. -------------------------------------------------
    query_cache_size = 128M
  1. -------------------------------------------------
  2. Try number of CPU's*2 for thread_concurrency
  3. -------------------------------------------------
    thread_concurrency = 16
  1. -------------------------------------------------
  2. Cactid is aggressive at thread consumption
  3. -------------------------------------------------
    max_connections = 2000
  1. -------------------------------------------------
  2. You need this if running PHP4
  3. -------------------------------------------------
    old_passwords = y
  1. -------------------------------------------------
  2. Max Heap are Better for Group By's
  3. -------------------------------------------------
    #max_heap_table_size = 1000M
    max_heap_table_size = 8000M
    #tmp_table_size = 32216M
    tmp_table_size = 16000M
  1. -------------------------------------------------
  2. Let's log slow queries of more than 20 seconds
  3. -------------------------------------------------
    #log-queries-not-using-indexes
    slow_query_log = ON
    long_query_time = 20
  1. -------------------------------------------------
  2. MyISAM STORAGE ENGINE SETTINGS
  3. -------------------------------------------------
  1. -------------------------------------------------
  2. Make as Large as Possible for MyISAM Storage
  3. -------------------------------------------------
    key_buffer = 256M
    join_buffer_size = 128M
  1. -------------------------------------------------
  2. Will keep a temporary table in memory, so don't spare size here
  3. -------------------------------------------------
    myisam_sort_buffer_size = 64M
  1. -------------------------------------------------
  2. InnoDB STORAGE ENGINE SETTINGS
  3. -------------------------------------------------
  1. -------------------------------------------------
    character_set_server = utf8mb4
    collation_server = utf8mb4_unicode_ci
  2. -------------------------------------------------
  1. -------------------------------------------------
  2. This is important for tracking the size of the database
  3. -------------------------------------------------
    #innodb_file_per_table
    innodb_stats_on_metadata = OFF
    #innodb_large_prefix=1
    #innodb_file_format=barracuda
    innodb_flush_method=O_DIRECT

innodb_doublewrite = 0

innodb_data_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/

  1. -------------------------------------------------
  2. You can set .._buffer_pool_size up to 50 - 80 %
  3. of RAM but beware of setting memory usage too high
  4. e.g. set to 50% if using as local database and
  5. set to 80% if using as remote database
  6. -------------------------------------------------
    #innodb_buffer_pool_size = 257733M
    innodb_buffer_pool_size = 64G
    innodb_buffer_pool_instances = 2
  1. -------------------------------------------------
  2. Set .._log_file_size to 25 % of buffer pool size
  3. -------------------------------------------------
    innodb_log_file_size = 16G
    #innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_lock_wait_timeout = 50

[isamchk]
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

  1. this is only for embedded server
    [embedded]
  1. This group is only read by MariaDB-5.5 servers.
  2. If you use the same .cnf file for MariaDB of different versions,
  3. use this group for options that older servers don't understand
    [mysqld-5.5]
  1. These two groups are only read by MariaDB servers, not by MySQL.
  2. If you use the same .cnf file for MySQL and MariaDB,
  3. you can put MariaDB-only options here
    [mariadb]

[mariadb-5.5]


Generated at Thu Feb 08 10:36:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.