Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I Have Setup master slave replication in mongo its working fine for few month then after that suddenly replication fails.I have started again with initial sync but during sync after a specific point it will again start resync and these process going on and on and slave have not complete their initial sync.

share|improve this question

migrated from Jul 15 '14 at 9:31

This question came from our site for professional and enthusiast programmers.

can you provide some logs about it? – xlembouras Jul 17 '14 at 11:56
the log file contain initial sync pending and Again start resync agin and again – Ranjeet Kumar Jul 21 '14 at 12:30

One reason could be that your oplog is too small.

On the master:


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:

share|improve this answer

Your Answer


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

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