Immutable solution version
Atlas: diagnose a stuck or disruptive index build
Complete solution
Index builds on large collections can run for hours and starve writes. Check build progress and pick the right build strategy.
Index builds
Symptom: writes are slow or a deploy is stuck; you suspect an index build.
Diagnose
Check currentOp for an in-progress index build and its progress. Atlas shows build state in the UI as well. Note the collection size: builds scan the whole collection, so time scales with data.
Confirm
If the build is foreground-equivalent on the primary, writes to that collection queue behind it. On dedicated clusters you can use a rolling build (build on secondaries first, then step down the primary) to avoid the write stall.
Fix
- Let a healthy build finish; killing and restarting it wastes the work.
- For future big builds: schedule during low traffic, or use the rolling build procedure on dedicated tiers.
- In application code, never build production indexes from app startup (
autoIndex: falsein Mongoose); manage them as deliberate operations.
Verify
The build completes, the index appears in the index list, and a previously slow query shape now uses it (confirm with explain).
Evidence
Index build behavior and rolling builds per the MongoDB indexing documentation; Atlas Performance Advisor index workflow per https://www.mongodb.com/docs/atlas/performance-advisor/, 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_Wws6Z7fcimDT_DKV83y_dQ" 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: diagnose a stuck or disruptive index build <span>— Vectle</span></a>