Bug #67149 | Slave writing a ton of nearly-empty relay logs and never being able to catch up | ||
---|---|---|---|
Submitted: | 9 Oct 2012 17:01 | Modified: | 24 Jan 2013 17:39 |
Reporter: | Michael Finch | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | mysql55-5.5.27-2 | OS: | Linux (centos6.3) |
Assigned to: | Matthew Lord | CPU Architecture: | Any |
Tags: | catch up, empty, relay-log, replication, slow |
[9 Oct 2012 17:01]
Michael Finch
[11 Oct 2012 18:48]
Sveta Smirnova
Thank you for the report. > Slave should be able to catch up to master. It seems strange that the slave writes a repeatable pattern of 4k relay-log, 4k relay-log, 1.1gb relay-log. Is it possible that you send large packet from master? Like a query of 1G size or multiple-queries transaction of same size. Please also provide your slave configuration file.
[12 Oct 2012 18:58]
Michael Finch
> Is it possible that you send large packet from master? Like a query of 1G size or multiple-queries transaction of same size. I don't think so because sometimes only 1 slave of many experiences this. All slaves have this configuration (except server-id): ## _______________________________________________________________________ ## / Rackspace MySQL 5.5 Terse Configuration File \ ## | | ## | This is a base configuration file containing the most frequently used | ## | settings with reasonably defined default values for configuring and | ## | tuning MySQL. Note that these settings can likely be further tuned in | ## | order to get optimum performance from MySQL based upon the database | ## | configuration and hardware platform. | ## | | ## | While the settings provided are likely sufficient for most | ## | situations, an exhaustive list of settings (with descriptions) can be | ## | found at: | ## | http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html | ## | | ## | Take care to only add/remove/change a setting if you are comfortable | ## | doing so! For Rackspace customers, if you have any questions or | ## | concerns, please contact the MySQL Database Services Team. Be aware | ## | that some work performed by this team can involve additional billable | ## \ fees. / ## ----------------------------------------------------------------------- ## \ ^__^ ## \ (oo)\_______ ## (__)\ )\/\ ## ||----w | ## || || [mysql] no-auto-rehash # MNT based socket = /mnt/mysql/mysql.sock # STANDARD based #socket = /var/lib/mysql/mysql.sock [mysqld] ## General #datadir = /var/lib/mysql #tmpdir = /var/lib/mysqltmp #socket = /var/lib/mysql/mysql.sock # BE Override skip-name-resolve sql-mode = NO_ENGINE_SUBSTITUTION #event-scheduler = 1 ########################################## START OF OVERRIDES ###################################################### # MNT based datadir = /mnt/mysql tmpdir = /mnt/mysql/tmp socket = /mnt/mysql/mysql.sock general-log = 0 log-error = /mnt/mysql/log/mysqld.log slow-query-log-file = /mnt/mysql/log/slow.log log-bin = /mnt/mysql/log/bin-log relay-log = /mnt/mysql/log/relay-log # STANDARD based #datadir = /var/lib/mysql #tmpdir = /var/lib/mysqltmp #socket = /var/lib/mysql/mysql.sock #general-log = 0 #log-error = /var/log/mysqld.log #slow-query-log-file = /var/lib/mysqllogs/slow-log #log-bin = /var/lib/mysqllogs/bin-log #relay-log = /var/lib/mysqllogs/relay-log ##### REPLICATION server-id = 7 # put the next line on the slave to allow it to be master to other slaves log-slave-updates = 1 ## tables that should be ignore by slave #### removed # performance tweaks max-connect-errors = 10000 max_connections = 300 open-files-limit = 131072 max-allowed-packet = 200M table_cache = 256 default-storage-engine = MyISAM #read_buffer_size = 1M #read_rnd_buffer_size = 256K #myisam_sort_buffer_size = 300M #join_buffer_size=500M # in memory operation #max_heap_table_size = 1G # tmp table size limit #tmp_table_size = 5G #thread_cache_size = 8 query-cache-type = 1 query-cache-size = 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 16 # innodb tweaks innodb-open-files = 16384 innodb-lock-wait-timeout = 500 # innodb-buffer-pool-size increase number for locks innodb-buffer-pool-size = 256M innodb-additional-mem-pool-size = 20M innodb-log-buffer-size = 4M innodb-thread-concurrency = 16 # put each innodb data in its own file per table # not that transactions and dict are still in shared data file # http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces.html innodb-file-per-table = 1 slow-query-log = 1 long-query-time = 3 ########################################## END OF OVERRIDES ###################################################### ## Cache thread-cache-size = 64 table-open-cache = 4096 table-definition-cache = 4096 #query-cache-size = 32M #query-cache-limit = 1M ## Per-thread Buffers sort-buffer-size = 1M read-buffer-size = 1M read-rnd-buffer-size = 1M join-buffer-size = 1M ## Temp Tables tmp-table-size = 32M max-heap-table-size = 64M ## Networking back-log = 100 #max-connections = 200 #max-connect-errors = 10000 #max-allowed-packet = 16M interactive-timeout = 3600 #wait-timeout = 600 ### Storage Engines #default-storage-engine = InnoDB #innodb = FORCE default-storage-engine = MyISAM ## MyISAM key-buffer-size = 64M myisam-sort-buffer-size = 128M ## InnoDB #innodb-buffer-pool-size = 128M #innodb-log-file-size = 100M #innodb-log-buffer-size = 8M #innodb-file-per-table = 1 #innodb-open-files = 300 ## Replication #server-id = 1 #log-bin = /var/lib/mysqllogs/bin-log #relay-log = /var/lib/mysqllogs/relay-log relay-log-space-limit = 16G expire-logs-days = 7 #read-only = 1 #sync-binlog = 1 #log-slave-updates = 1 #binlog-format = STATEMENT #auto-increment-offset = 1 #auto-increment-increment = 2 ## Logging log-output = FILE #slow-query-log = 1 #slow-query-log-file = /var/lib/mysqllogs/slow-log # BE override log-slow-slave-statements #long-query-time = 2 [mysqld_safe] #log-error = /var/log/mysqld.log # BE Overrides #open-files-limit = 65535
[24 Jan 2013 17:39]
Matthew Lord
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the clearly the result of a verifiable/repeatable bug. The symptom you describe would be caused by the slave trying to repeatedly read a binary log event from the master and failing. Tracking this down could easily be done via the proper methods, but that does not include a bug report. Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/ Thank you for your interest in MySQL.