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

**Code:** `Secondary too stale to catch up (RECOVERING)` · **Category:** MongoDB · **Seen on:** MongoDB

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/mongodb/secondary-too-stale-to-catch-up)
