150 — StaleEpoch

sharding

The shard version or epoch is stale — the config has changed

What is happening?

StaleEpoch is returned when a mongos or shard determines that its cached routing information is out of date. This happens after chunk migrations, shard additions/removals, or collection drops and recreations. It is normally retried transparently by the driver or mongos.

Common causes

  1. Chunk migration just completed and routing tables are refreshing
  2. Collection was dropped and recreated while operations were in-flight
  3. Config server was temporarily unreachable
  4. Shard added or removed from the cluster

Diagnostic Steps