I'm working with MongoDB Atlas and I have a cluster of 3 with M30 and 100gb of storage.

My current usecase is the following: - An user dispatches one search in my platform - The platform dispatches this search to other providers (12) - I get like 2k documents per provider for this search

For the configuration, I'm working with Mongodb Atlas in a 3 replica-set cluster (M30 = 8 GB RAM • 100 GB storage). I also have an TTL index to expire the documents in the only database/collection I'm using to delete the documents after 10 minutes based on a date field in each document (searchStartedAt).

What I was trying to understand is this alert I'm getting ("Replication Oplog Window has gone below 1 hours"), if I got this right is how long the master node can continue receiving data before the slave nodes get out of sync.

I would like to check if my understanding is right and if there is any tunning possible to avoid this.

Can someone give me a hint? If any other information can help regarding this, please let me know and I'll update the question.

Thanks a lot for any tips regarding it.

1 Answer 1


If replication OpLog window goes under one hour, it means that timestamp between first and last lines in the OpLog is under one hour. This can happen when there is lots of changes in the DB and your size of OpLog is "too small". No, this is not fatal. It just means that your secondary nodes cannot "fallback" more than what is your OpLog window. I mean that if your window is f.ex. 55 minutes, you cannot stop your secondary node for over 55 minutes, because it cannot "catch-up" anymore and it needs to do "full sync" and if that full sync takes more than 55 minutes, it cannot be done.

What you can do is change OpLog size to bigger. If you double your OpLog size, you get double size window.

  • "if that full sync takes more than 55 minutes, it cannot be done." how can you ever reclaim your secondary node then ?
    – Eran Otzap
    Commented Dec 30, 2021 at 13:32
  • 1
    Take snapshot of primary node disk/data directory and move that to the secondary. After start of mongod process, it will sync just those changes what happen between snapshot and current moment of time.
    – JJussi
    Commented Jan 1, 2022 at 10:28
  • I have a rs where in I do mongoimport which does upsert of 290K docs, and this happens only twice a day. twelve hours spaced. During that time I get this warning. It resolves automatically in some time. I wonder if I have to inc opLog size - because all the other times, writes are normal, and not extreme like this. @JJussi
    – Arun S R
    Commented Apr 22, 2023 at 7:55
  • @ArunSR yes, it's better if you increase your OpLog size. Because, if something happens to your secondary node(s) just when OpLog is "a bit too small", recovery is hard. Anyway, disk space is not that expensive, and we are not talking huge amounts of it.
    – JJussi
    Commented Apr 23, 2023 at 15:19
  • @JJussi this documentation is what I am referring, is this the only way? there is no gui way to do it from atlas portal. I am using 4.4 replica set
    – Arun S R
    Commented Apr 24, 2023 at 13:26

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.