Alert Replication Oplog Window has gone below 1 hours

In Atlas I get these alerts several times a day. Do I need to change anything? It is unclear from the Atlas interface what the oplog capacity is set to and it is unclear from the documentation what my options are here.

Hi @Graeme_Henderson ,

Please note that some of the below information is also communicated in the Alert Resolutions > Replication Oplog Alerts documentation.

Do I need to change anything?

If a large amount of write operations are conducted on the PRIMARY node of the replica set and the SECONDARY nodes do not have enough time to replay all of the operations contained in the oplog, this will typically result in "falling off the oplog", which requires an initial sync in order to recover and ensure that the data is consistent across all nodes.

There are a few things that help mitigate the risk of falling off the oplog:

  1. Increase the oplog size of the cluster via the configuration panel. The larger the oplog is, the larger the window the cluster has to replicate operations that take place, which in turn makes it less likely that SECONDARY nodes will fall off the oplog. I recommend reviewing the Oplog GB/Hour and Replication Window metrics to determine what the best value would be in your case. For instance, you can check how much oplog you are generating at peak time and consider having at least X GB oplog size so that you can have 1 hour replication oplog window for this kind of peak workload (Where X is the peak value of Oplog GB/Hour in your metrics).

  2. Utilize a write concern of w: majority to ensure that writes are acknowledged by a majority of nodes in the replica set before moving on to the next operation.

It is unclear from the Atlas interface what the oplog capacity is set to

You should be able to view (and set) the clusters oplog size configuration by following the below steps in the Atlas UI:

  1. Going to the Clusters section
  2. Select ... on the cluster you wish to view / configure the oplog size for
  3. Select Edit configuration
  4. Select the Additional Settings tab (to expand)
  5. Select the More Configuration Options tab (to expand)
  6. View (or Set) the Oplog Size (in MB)
  7. Click Review Changes
  8. Click Apply Changes

Hope this helps.

Kind Regards,
Jason

1 Like