P
P
Pavel Bezrukov2015-01-25 23:33:30
MySQL
Pavel Bezrukov, 2015-01-25 23:33:30

What causes persistent mysql replication errors 1032 and 1062?

Good afternoon.
Understanding mysql replication. Raised master(+2 slave) - master(+1 slave) replication.
Did everything as instructed.
- Locked tables on the master for writing
- Made a backup and sent it to the slave
- Stopped the slave on the slave - Expanded the
backup and set the details of the master status.
Enabled read-only on slaves.
Everything is working.
After some short time, either the 1032nd or the 1062nd error crashes on any node.
Error Code: 1062 - Duplicate entry 'ххххх' for key 1 - Attempt to write an already existing value to the key column.
Error: 1032 SQLSTATE: HY000 (ER_KEY_NOT_FOUND) - Message: Cannot find entry in '%s'
The project was raised on a demo version of Bitrix and virtualbox nodes.
Errors occur in actively used tables - statistics (fixing hits, etc., etc.) and sessions, most often sessions.
Master configs

[mysqld]
 server-id = 1
 ## enable logging message
 log-error                       = /var/log/mysql/error.log
## enable slow requests logging
 slow-query-log-file             = /var/log/mysql/slow.log
 slow-query-log                  = 1
 long-query-time                 = 3
 log-slow-slave-statements
## define binlog options for master server
 binlog_cache_size = 128K
 expire_logs_days  = 5
 max_binlog_size   = 100M
 binlog-format     = mixed
 log-bin           = mysql-bin
## enable this options for security, but it decrease performance
# innodb_flush_log_at_trx_commit = 1
# sync_binlog = 1
 relay-log            = relay-bin
 relay-log-index      = relay-bin.index
 relay-log-info-file  = relay-bin.info
 skip-name-resolve
Slave configs
[mysqld]
 server-id = 2
 ## enable logging message
 log-error                       = /var/log/mysql/error.log
## enable slow requests logging
 slow-query-log-file             = /var/log/mysql/slow.log
 slow-query-log                  = 1
 long-query-time                 = 3
 log-slow-slave-statements
 relay-log            = relay-bin
 relay-log-index      = relay-bin.index
 relay-log-info-file  = relay-bin.info
 skip-name-resolve

What could be wrong?
Literally just now restored master1-master2 master2-slave4 replication about 5 times updated the page on slave4 error 1032, and before that siege tested the load and master2 and slave4 about which he spoke fell off - this should not be so!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-01-25
@Nc_Soft

Master-master replication or how to succeed without Vaseline

A
Archie Kuznetsov, 2015-01-26
@Wolf4ara

Good afternoon!
1. indicate the version of the muscle
2. indicate the method and parameters when removing the dump
3. what rights do you give, and how do you launch it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question