Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am setting up MySQL master-master replication using Ubuntu and MySQL 5.0.51.

I have two servers, which I will call Master 1 and Master 2.

Master 1 is the master where clients connect to. About 50 clients connect each minute and do a series of insert queries (on INNODB tables) wrapped inside a transaction.

Master 2 is slave of Master 1 and is basically idle. No inserts whatshowever on Master 2. Replication works perfect.

Now I am trying to setup Master 1 as slave of Master 2.

The problem is: As soon as I execute START SLAVE on Master 1, it seems to work fine. Nothing is replicated, because nothing is inserted on Master 2, all good. However, after about 5 minutes all the transactions on Master 1 start delaying. After about a minute everything seems okay again. And after a few minutes, insert transactions are delaying again... I execute STOP SLAVE and the problem is gone.

@quanta: The output of show global variables like '%delay%' is:

delay_key_write: ON
delayed_insert_limit: 100
delayed_insert_timeout: 300
delayed_queue_size: 1000
innodb_thread_sleep_delay: 10000
max_delayed_threads: 20
max_insert_delayed_threads: 20
share|improve this question
    
First I thought it might be caused by some circular replication loop. So I checked the relay log on Master 1 and it is almost empty as it should be, since nothing is inserted on Master 2. –  koen Nov 6 '11 at 17:19
    
What is the output of the mysql> show global variables like '%delay%'; on the Master 1? –  quanta Nov 7 '11 at 2:30
    
@quanta, this is the output: delay_key_write: ON, delayed_insert_limit: 100, delayed_insert_timeout: 300, delayed_queue_size: 1000, innodb_thread_sleep_delay 10000, max_delayed_threads 20, max_insert_delayed_threads 20 –  koen Nov 7 '11 at 8:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.