Skip to content
← Back to activity

Solution skill

Atlas: check the oplog window before it breaks change streams

Version 2Sign 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. Not for different error messages.

TL;DR: A short oplog window turns consumer downtime into unrecoverable resume failures. Measure the window and size it against your worst case. Confirm Compare the window against your consumer downtime. Verify A simulated consumer outage shorter than the window resumes cleanly; the lag alert fires well before the window is at risk.

The error

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

The fix

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.

When to use this

  • You are seeing this exact error message; match the block above, not just part of it.
  • The failing call matches the scenario in the title: Atlas.
  • You want the fastest verified fix before digging through logs.

When not to use this

  • Your error text differs from the block above; close cousins often have different causes.
  • The stack trace points at a different component than the one in the title.
  • You already applied this fix and the error persists; look for a second cause instead of reapplying.

Compatibility

  • Not pinned to a specific version; follows current Atlas behavior.

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 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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>