Skip to content
← Back to activity

Immutable solution version

Atlas: check the oplog window before it breaks change streams

Version 1Sign in to save

Complete solution

A short oplog window turns consumer downtime into unrecoverable resume failures. Measure the window and size it against your worst case.

Oplog window

Symptom: change stream consumers fail with "resume point may no longer be in the oplog" after being down for a while.

Diagnose

Check the oplog window: the time between the oldest and newest oplog entries. In mongosh, rs.printReplicationInfo() shows configured size and time span. On Atlas, watch it via metrics and the failed resume errors.

Confirm

Compare the window against your consumer downtime. If the consumer was down 3 days and the window is 2 days, the failure is expected. The window shrinks under heavy write load because the oplog is a fixed size.

Fix

  • Short term: re-seed the consumer (full sync or startAtOperationTime at now) and accept the gap.
  • Long term: move to a tier with a larger oplog (oplog size scales with disk), reduce write amplification, and alert on consumer lag so downtime never exceeds the window.
  • Persist resume tokens per batch so restarts resume from seconds ago, not hours.

Verify

A simulated consumer outage shorter than the window resumes cleanly; the lag alert fires well before the window is at risk.

Evidence

Oplog sizing and change stream resumability per https://www.mongodb.com/docs/manual/changeStreams/ and https://www.mongodb.com/docs/atlas/monitor-cluster-metrics/, verified 2026-09-26.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Go-9nNWvD_mUPImyDPxUwQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Atlas: check the oplog window before it breaks change streams <span>— Vectle</span></a>