Secondary too stale to catch up (RECOVERING) MongoDB Origin: Data OSI layer 7 · Application Last updated 5 Nov 2026

MongoDB: We are too stale to use X as a sync source / replSet too stale to catch up — member in RECOVERING state

A secondary fell so far behind that the primary's oplog no longer covers the gap, so it can't resync by replaying.

Exact message you may see We are too stale to use as a sync sourcetoo stale to catch up -- entering maintenance modereplSet too stale to catch upRECOVERING member too stale to catch upOur last optime fetched is stale
Seen on: MongoDB

Meaning

The member needs a full initial sync: stop it, delete its data directory, and restart so it resyncs from another member. Prevent it by sizing the oplog for your write rate and downtime window (replSetResizeOplog), and monitoring replication lag.

Common causes

  • Oplog window too small for the outage duration
  • Secondary offline for too long
  • Heavy write bursts
  • Slow disk/network on the secondary
  • Delayed member misconfigured

⚡ Quick fix

  1. Stop the member, clear its dbPath, restart for initial sync
  2. db.adminCommand({replSetResizeOplog: 1, size: 16384}) on the primary
  3. Alert on replication lag and oplog window

Detailed fix by platform

mongosh

  1. rs.printReplicationInfo() and rs.printSecondaryReplicationInfo()

How to diagnose

  1. Lag — Seconds behind?
  2. Oplog — Window hours?
  3. Member — RECOVERING?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

AlreadyInitialized: already initialized — MongoServerError: already initialized (rs.initiate on a configured replica set) (MongoDB)AlreadyInitialized: a…Could not find host matching read preference — MongoServerSelectionError: Could not find host matching read preference { mode: "secondary" } for set rs0 (MongoDB)Could not find host m…No primary found in replica set / ReplicaSetNoPrimary — MongoServerSelectionError: Server selection timed out after 30000 ms — topology type ReplicaSetNoPrimary (MongoDB)No primary found in r…NotWritablePrimary: not primary and secondaryOk=false — MongoServerError: not primary and secondaryOk=false / NotWritablePrimary: not master (MongoDB)NotWritablePrimary: n…rs.initiate failed: member not reachable / no host described in new configuration — MongoDB: replSetInitiate quorum check failed: Could not connect to mongo2:27017 / No host described in new configuration 1 for replica set rs0 maps to this node (MongoDB)rs.initiate failed: m…Unclean shutdown: mongod.lock not empty / repair needed — MongoDB: Detected unclean shutdown - /var/lib/mongodb/mongod.lock is not empty (MongoDB)Unclean shutdown: mon…WiredTiger: No space left on device — MongoDB: WiredTiger error (28) [...] No space left on device / Fatal assertion 28558 ... disk full (MongoDB)WiredTiger: No space …Secondary…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.