0

I have set up master slave replication in mongo. It works fine for a few months, then suddenly replication fails. I have started it again with initial sync but during sync after a specific point it will again start resync and this process goes on and on, and slaves have not complete their initial sync.

The log file contains initial sync pending and again start resync again and again.

0

1 Answer 1

1

One reason could be that your oplog is too small.

On the master:

db.getReplicationInfo()

If timeDiffHours is shorter than the time that your initial sync takes, then the initial sync will fail and start again...

Resizing the oplog is quite easy, if this is indeed your problem. The documentation is here: http://docs.mongodb.org/manual/tutorial/change-oplog-size/

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.