<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MongoDB Operations Guides on Netdata</title><link>https://www.netdata.cloud/guides/mongodb/</link><description>Recent content in MongoDB Operations Guides on Netdata</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.netdata.cloud/guides/mongodb/index.xml" rel="self" type="application/rss+xml"/><item><title>How MongoDB actually works in production: a mental model for operators</title><link>https://www.netdata.cloud/guides/mongodb/how-mongodb-works-in-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/how-mongodb-works-in-production/</guid><description>&lt;h1 id="how-mongodb-actually-works-in-production-a-mental-model-for-operators">How MongoDB actually works in production: a mental model for operators&lt;/h1>
&lt;p>A write latency spike in MongoDB is rarely a query problem. It is more often a storage journal stall, cache eviction cascade, ticket exhaustion, or replication flow-control throttle. Operators who treat MongoDB as a monolithic document database often tune indexes while the real bottleneck is a WiredTiger checkpoint falling behind.&lt;/p>
&lt;p>This guide is a runtime mental model for the subsystems that matter in production: the WiredTiger storage engine, replication state machine, thread-per-connection execution model, and sharding coordination layer. Understanding how these compete for memory, disk, tickets, and connections lets you read signals correctly instead of guessing.&lt;/p></description></item><item><title>MongoDB and Transparent Huge Pages: why THP must be disabled</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-disable-transparent-huge-pages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-disable-transparent-huge-pages/</guid><description>&lt;h1 id="mongodb-and-transparent-huge-pages-why-thp-must-be-disabled">MongoDB and Transparent Huge Pages: why THP must be disabled&lt;/h1>
&lt;p>If you see a mongod startup warning about Transparent Huge Pages, or you are chasing tail latency spikes and memory fragmentation that do not correlate with cache pressure, ticket exhaustion, or slow queries, the cause may be THP. The standard advice has always been to disable it, but that is now version-dependent. MongoDB 8.0 upgraded TCMalloc to use per-CPU caches, which changes the recommendation for most x86_64 Linux deployments. For MongoDB 7.0 and earlier, disabling THP is still correct. For 8.0 on x86_64 Linux, THP should be enabled. Running the wrong configuration silently degrades throughput and increases latency.&lt;/p></description></item><item><title>MongoDB Authentication failed: credential rotation, brute force, and the log signal</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-authentication-failed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-authentication-failed/</guid><description>&lt;h1 id="mongodb-authentication-failed-credential-rotation-brute-force-and-the-log-signal">MongoDB Authentication failed: credential rotation, brute force, and the log signal&lt;/h1>
&lt;p>A spike of &lt;code>Authentication failed&lt;/code> entries in the MongoDB log is abnormal: in a healthy deployment the baseline is near zero. The signal usually means one of four things: a brute-force attack, an application presenting stale credentials after rotation, an expired x.509 certificate, or an upstream LDAP or Kerberos directory issue. Distinguishing between these quickly determines whether you are facing a security incident or an impending application outage.&lt;/p></description></item><item><title>MongoDB balancer stuck and jumbo chunks: permanent imbalance and how to fix it</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-balancer-stuck-jumbo-chunks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-balancer-stuck-jumbo-chunks/</guid><description>&lt;h1 id="mongodb-balancer-stuck-and-jumbo-chunks-permanent-imbalance-and-how-to-fix-it">MongoDB balancer stuck and jumbo chunks: permanent imbalance and how to fix it&lt;/h1>
&lt;p>One shard is hot while the others idle. &lt;code>sh.status()&lt;/code> shows chunk counts skewed more than 20%. The balancer is either stopped or running without closing the gap. Until you fix the root cause, the imbalance persists.&lt;/p>
&lt;p>Two failure modes cause this. The balancer itself can be disabled, restricted to a narrow window, or blocked by an unhealthy config server. Or the cluster has jumbo chunks: ranges that exceed the configured chunkSize but cannot split because too many documents share the exact same shard key value. MongoDB marks those chunks &lt;code>jumbo&lt;/code> in &lt;code>config.chunks&lt;/code> and the balancer skips them. That heavy chunk pins load and storage on a single shard and creates a floor on how balanced the cluster can become.&lt;/p></description></item><item><title>MongoDB cache too small: sizing the WiredTiger cache for your working set</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-cache-undersized-working-set/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-cache-undersized-working-set/</guid><description>&lt;h1 id="mongodb-cache-too-small-sizing-the-wiredtiger-cache-for-your-working-set">MongoDB cache too small: sizing the WiredTiger cache for your working set&lt;/h1>
&lt;p>When MongoDB latency doubles and disk read IOPS climb, operators usually check indexes and the query planner first. If &lt;code>db.currentOp()&lt;/code> shows no runaway query and the slow query log is quiet, the culprit is often the WiredTiger cache.&lt;/p>
&lt;p>WiredTiger maintains its own in-memory cache of uncompressed B-tree pages, separate from the OS page cache. MongoDB defaults the cache to &lt;code>max(0.5 * (RAM - 1 GB), 256 MB)&lt;/code>. That default works for a single mongod on a dedicated host, but it breaks down in containers, multi-tenant deployments, and during organic data growth. Once the working set exceeds the cache, reads fault to disk, pages are decompressed, and eviction threads compete with application threads for CPU.&lt;/p></description></item><item><title>MongoDB checkpoint duration climbing: diagnosing slow WiredTiger checkpoints</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-checkpoint-duration-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-checkpoint-duration-high/</guid><description>&lt;h1 id="mongodb-checkpoint-duration-climbing-diagnosing-slow-wiredtiger-checkpoints">MongoDB checkpoint duration climbing: diagnosing slow WiredTiger checkpoints&lt;/h1>
&lt;p>You notice &lt;code>transaction checkpoint most recent time (msecs)&lt;/code> climbing past 10 seconds, then 30, then 50. It is trending upward, check after check, approaching the 60-second default checkpoint interval. When checkpoint duration meets or exceeds the interval, WiredTiger has no margin left. The next checkpoint starts late, dirty pages accumulate faster than they flush, and the journal can fill to the point where all new writes block until the checkpoint finishes. This is a common production failure mode that starts as a slow climb and ends as a write freeze.&lt;/p></description></item><item><title>MongoDB checkpoint stall write freeze: when all writes stop with no error</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-checkpoint-stall-write-freeze/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-checkpoint-stall-write-freeze/</guid><description>&lt;h1 id="mongodb-checkpoint-stall-write-freeze-when-all-writes-stop-with-no-error">MongoDB checkpoint stall write freeze: when all writes stop with no error&lt;/h1>
&lt;p>Writes time out or hang while &lt;code>mongod&lt;/code> is running, TCP port 27017 is open, and reads still return results from cache. The MongoDB logs are quiet, but &lt;code>db.serverStatus().opcounters&lt;/code> shows write counts frozen. This is a WiredTiger checkpoint stall: the checkpoint process fell behind, dirty pages accumulated, and new writes blocked. The freeze lasts until the current checkpoint completes. If the I/O bottleneck remains, queued writes flood through and the next checkpoint stalls again.&lt;/p></description></item><item><title>MongoDB chunk migration storms: moveChunk I/O pressure and range locks</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-chunk-migration-storms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-chunk-migration-storms/</guid><description>&lt;h1 id="mongodb-chunk-migration-storms-movechunk-io-pressure-and-range-locks">MongoDB chunk migration storms: moveChunk I/O pressure and range locks&lt;/h1>
&lt;p>Write latency spikes across multiple shards simultaneously. Queries time out while &lt;code>mongos&lt;/code> logs show no election events. Donor shard primaries report growing queue depths, and &lt;code>config.changelog&lt;/code> shows a wall of &lt;code>moveChunk.error&lt;/code> &lt;!-- TODO: verify exact changelog event name for migration failures --> entries interleaved with retries. The balancer is hammering the cluster instead of helping.&lt;/p>
&lt;p>A single &lt;code>moveChunk&lt;/code> operation is expensive. It copies documents to the recipient, enters a critical section with a &lt;!-- TODO: verify exact lock mode during critical section --> shared range lock on the donor, then deletes orphaned documents. When the balancer triggers many migrations in quick succession, or individual migrations fail and retry in a tight loop, overlapping I/O pressure and lock contention compound into a cluster-wide latency event.&lt;/p></description></item><item><title>MongoDB connection churn: high totalCreated rate and thread creation overhead</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-connection-churn/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-connection-churn/</guid><description>&lt;h1 id="mongodb-connection-churn-high-totalcreated-rate-and-thread-creation-overhead">MongoDB connection churn: high totalCreated rate and thread creation overhead&lt;/h1>
&lt;p>&lt;code>db.serverStatus().connections&lt;/code> can show low &lt;code>current&lt;/code> and a rapidly climbing &lt;code>totalCreated&lt;/code>. That mismatch is connection churn: connections open and close rapidly instead of being reused. MongoDB uses a thread-per-connection model, so each cycle costs roughly a megabyte of thread stack, scheduling overhead, and file descriptor work. The result is rising RSS, CPU contention, and latency spikes that do not correlate with the active connection count.&lt;/p></description></item><item><title>MongoDB connection refused at maxIncomingConnections: hitting the connection ceiling</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-connection-limit-reached/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-connection-limit-reached/</guid><description>&lt;h1 id="mongodb-connection-refused-at-maxincomingconnections-hitting-the-connection-ceiling">MongoDB connection refused at maxIncomingConnections: hitting the connection ceiling&lt;/h1>
&lt;p>Application logs show connection timeouts. MongoDB logs show &lt;code>connection refused&lt;/code> or &lt;code>error accepting new connection&lt;/code>. &lt;code>db.serverStatus().connections&lt;/code> shows &lt;code>current&lt;/code> well below the configured maximum. This disconnect means you are hitting a hard ceiling at the TCP accept layer, not experiencing gradual degradation.&lt;/p>
&lt;p>MongoDB uses a one-thread-per-connection model. Each accepted connection consumes at least one file descriptor and a thread stack sized by the OS &lt;code>ulimit -s&lt;/code>. While &lt;code>maxIncomingConnections&lt;/code> sets the logical inbound cap, the OS file-descriptor limit (&lt;code>ulimit -n&lt;/code>) usually enforces the actual ceiling. Rejections happen before the connection handshake completes, so &lt;code>serverStatus().connections.current&lt;/code> never counts refused connections. Look at logs, ratios, and OS-level resource counts to find the real limit.&lt;/p></description></item><item><title>MongoDB connection storm spiral: reconnection floods after an election or deploy</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-connection-storm-spiral/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-connection-storm-spiral/</guid><description>&lt;h1 id="mongodb-connection-storm-spiral-reconnection-floods-after-an-election-or-deploy">MongoDB connection storm spiral: reconnection floods after an election or deploy&lt;/h1>
&lt;p>Connection count on a primary jumps from 200 to 4,000 in under a minute. Resident memory climbs, query latencies double, and application logs fill with timeout errors. The slow query log shows nothing unusual. Individual queries are not the problem. The database is drowning in threads.&lt;/p>
&lt;p>This is a connection storm spiral. A trigger event, usually a replica set election, application deploy, or network blip, invalidates existing connections across your application fleet. Every driver reconnects at once. Each new connection costs MongoDB a dedicated thread and roughly 1 MB of stack memory &lt;!-- TODO: verify per-connection committed memory on target platform; default thread stack reservation is often 8-10 MB -->. The resulting RSS spike and ticket contention slow down operations already in flight, causing more timeouts, which drives even more reconnections. The feedback loop ends in OOM kill or unresponsiveness.&lt;/p></description></item><item><title>MongoDB disk full: emergency recovery when mongod can't write the journal</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-disk-full/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-disk-full/</guid><description>&lt;h1 id="mongodb-disk-full-emergency-recovery-when-mongod-cant-write-the-journal">MongoDB disk full: emergency recovery when mongod can&amp;rsquo;t write the journal&lt;/h1>
&lt;p>When the filesystem backing the data or journal directory crosses a critical threshold, WiredTiger cannot allocate new journal extents. If mongod crashes or restarts, recovery replays journal files since the last checkpoint and requires free headroom to create or extend files during that replay. On a full disk, mongod hangs in recovery without binding to port 27017.&lt;/p>
&lt;p>If the node is a standalone, there is no replica to fail over to. If it is a secondary, cluster redundancy is reduced while the member is down. Recovery is complicated by a counterintuitive storage engine behavior: WiredTiger reclaims space internally after deletes, but does not automatically shrink data files or return bytes to the operating system. A volume that reads 99% full after a massive delete remains 99% full at the filesystem level.&lt;/p></description></item><item><title>MongoDB disk I/O saturation: correlating iostat with WiredTiger signals</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-disk-io-saturation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-disk-io-saturation/</guid><description>&lt;h1 id="mongodb-disk-io-saturation-correlating-iostat-with-wiredtiger-signals">MongoDB disk I/O saturation: correlating iostat with WiredTiger signals&lt;/h1>
&lt;p>When &lt;code>opLatencies.writes&lt;/code> climbs and &lt;code>globalLock.currentQueue&lt;/code> grows, &lt;code>db.serverStatus().wiredTiger.transaction&lt;/code> often shows the most recent checkpoint took 45 seconds. WiredTiger metrics tell you &lt;em>what&lt;/em> is hurting, but they do not tell you &lt;em>why&lt;/em>. The next question is whether the disk is actually saturated.&lt;/p>
&lt;p>Disk I/O saturation surfaces as climbing journal sync latency, checkpoint duration exceeding the 60-second interval, application-thread evictions, and ticket exhaustion. The only way to separate a storage problem from a query problem is to correlate OS-level disk signals (&lt;code>iostat -x&lt;/code>) with WiredTiger internal signals in the same time window. This guide shows how to do that safely during an incident.&lt;/p></description></item><item><title>MongoDB exceeded memory limit for $group — aggregation spills and allowDiskUse</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-exceeded-memory-limit-group-sort/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-exceeded-memory-limit-group-sort/</guid><description>&lt;h1 id="mongodb-exceeded-memory-limit-for-group--aggregation-spills-and-allowdiskuse">MongoDB exceeded memory limit for $group — aggregation spills and allowDiskUse&lt;/h1>
&lt;p>Application logs show error 16945, or an aggregation pipeline slows by an order of magnitude. In MongoDB, every aggregation stage not backed by an index is limited to 100 megabytes of RAM. When a stage exceeds this limit and disk spilling is not enabled, the operation fails immediately. If spilling is enabled, MongoDB writes temporary files to disk, which keeps the pipeline alive but adds unpredictable latency and extra I/O load.&lt;/p></description></item><item><title>MongoDB exposed to the internet without authentication: bindIp and the breach scenario</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-exposed-without-auth/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-exposed-without-auth/</guid><description>&lt;h1 id="mongodb-exposed-to-the-internet-without-authentication-bindip-and-the-breach-scenario">MongoDB exposed to the internet without authentication: bindIp and the breach scenario&lt;/h1>
&lt;p>A &lt;code>mongod&lt;/code> process bound to all interfaces with authentication disabled exposes every database to any host that can reach port 27017. If you are responding to a scan, PAGE, or audit, confirm the exposure, measure the blast radius, and eliminate the surface.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>MongoDB&amp;rsquo;s &lt;code>net.bindIp&lt;/code> controls which interfaces accept connections. Modern packages default &lt;code>bindIp&lt;/code> to &lt;code>127.0.0.1&lt;/code>; exposure usually follows an explicit override to a wildcard such as &lt;code>0.0.0.0&lt;/code> or &lt;code>::&lt;/code>. Without authentication, any reachable host can list databases, read or write documents, and execute administrative commands.&lt;/p></description></item><item><title>MongoDB flow control throttling writes: when the primary slows itself down</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-flow-control-throttling-writes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-flow-control-throttling-writes/</guid><description>&lt;h1 id="mongodb-flow-control-throttling-writes-when-the-primary-slows-itself-down">MongoDB flow control throttling writes: when the primary slows itself down&lt;/h1>
&lt;p>Write throughput on the primary has dropped by 30% or more. Application logs show intermittent write latency spikes, but the primary&amp;rsquo;s CPU, memory, and disk metrics look healthy. There are no elections, cache pressure warnings, or obvious errors. Check replication: secondaries are lagging. The primary is not sick; it is throttling itself.&lt;/p>
&lt;p>MongoDB 4.2 introduced flow control, a ticket-based admission mechanism that caps the primary&amp;rsquo;s write rate to keep secondaries from falling off the oplog. When &lt;code>isLagged&lt;/code> is true, the primary artificially limits throughput. The fix is rarely on the primary. Look at the replication pipeline: a slow secondary, an oplog window that is too small, or a topology change that distorts majority commit lag.&lt;/p></description></item><item><title>MongoDB globalLock.currentQueue growing: operations queuing for the storage engine</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-queue-depth-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-queue-depth-growing/</guid><description>&lt;h1 id="mongodb-globallockcurrentqueue-growing-operations-queuing-for-the-storage-engine">MongoDB globalLock.currentQueue growing: operations queuing for the storage engine&lt;/h1>
&lt;p>&lt;code>globalLock.currentQueue.total&lt;/code> is climbing and not stabilizing after a burst. Under WiredTiger, this metric reflects waits at the intent lock and ticket admission layers, not a single global mutex. The engine is receiving work faster than it can drain it.&lt;/p>
&lt;p>If the total queue sustains above 20 and grows, the system is saturated. Queued operations become latency spikes, then connection pileups as applications retry, then a degradation spiral. The root cause is usually ticket exhaustion, a single hot collection, a long-running operation, or storage I/O degradation inflating ticket hold times.&lt;/p></description></item><item><title>MongoDB journal sync latency high: the storage signal that warns 60 seconds early</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-journal-sync-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-journal-sync-latency-high/</guid><description>&lt;h1 id="mongodb-journal-sync-latency-high-the-storage-signal-that-warns-60-seconds-early">MongoDB journal sync latency high: the storage signal that warns 60 seconds early&lt;/h1>
&lt;p>Application write latency spikes. Connections pile up. Look back 60 seconds and WiredTiger journal sync latency was likely already climbing. Every write with &lt;code>j:true&lt;/code> or &lt;code>w:&amp;quot;majority&amp;quot;&lt;/code> blocks until the journal buffer is fsynced to disk. When storage struggles, journal sync is the first domino to fall.&lt;/p>
&lt;p>Journal sync latency is a storage subsystem signal, not a query or cache problem. The block device under &lt;code>mongod&lt;/code> cannot absorb small sequential writes fast enough. The result is head-of-line delay for all durable writes, which cascades into ticket exhaustion and connection backlog.&lt;/p></description></item><item><title>MongoDB lock wait times: collection and metadata lock contention during DDL</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-lock-wait-times/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-lock-wait-times/</guid><description>&lt;h1 id="mongodb-lock-wait-times-collection-and-metadata-lock-contention-during-ddl">MongoDB lock wait times: collection and metadata lock contention during DDL&lt;/h1>
&lt;p>When p99 latency jumps and &lt;code>globalLock.currentQueue&lt;/code> grows, check &lt;code>serverStatus().locks&lt;/code>. If &lt;code>timeAcquiringMicros&lt;/code> is climbing for &lt;code>Collection&lt;/code> or &lt;code>Metadata&lt;/code>, the cause is almost always DDL: &lt;code>createIndexes&lt;/code>, &lt;code>dropIndexes&lt;/code>, &lt;code>collMod&lt;/code>, &lt;code>renameCollection&lt;/code>, or similar commands that acquire exclusive collection, database, or metadata locks. WiredTiger uses document-level concurrency for ordinary reads and writes, so normal CRUD rarely blocks. A single schema change can serialize operations on a hot collection or across a database during peak traffic.&lt;/p></description></item><item><title>MongoDB long-running operations: finding and killing the query holding a ticket</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-long-running-operations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-long-running-operations/</guid><description>&lt;h1 id="mongodb-long-running-operations-finding-and-killing-the-query-holding-a-ticket">MongoDB long-running operations: finding and killing the query holding a ticket&lt;/h1>
&lt;p>Your application latency just spiked. &lt;code>opLatencies&lt;/code> show reads and writes climbing. &lt;code>globalLock.currentQueue&lt;/code> is no longer zero. You check &lt;code>db.serverStatus().wiredTiger.concurrentTransactions&lt;/code>: available tickets are near zero, but throughput has not increased. An operation is holding a ticket without making progress.&lt;/p>
&lt;p>A collection scan, an unbounded aggregation, or a stalled write can hold a WiredTiger read or write ticket for minutes. The default is 128 read and 128 write tickets in most versions, so one long-running operation can cascade into system-wide queuing, connection pileup, and application timeouts. Find it and kill it, but killing the wrong operation can crash a node or leave data inconsistent.&lt;/p></description></item><item><title>MongoDB long-running transactions: pinned snapshots and silent cache pressure</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-long-running-transactions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-long-running-transactions/</guid><description>&lt;h1 id="mongodb-long-running-transactions-pinned-snapshots-and-silent-cache-pressure">MongoDB long-running transactions: pinned snapshots and silent cache pressure&lt;/h1>
&lt;p>MongoDB latency climbs while write throughput looks normal and the working set is unchanged. Check WiredTiger cache: the dirty ratio is rising and application threads have started evicting pages. The cause is often invisible in standard cache metrics &amp;ndash; a multi-document transaction that opened a snapshot and never let it go.&lt;/p>
&lt;p>Multi-document transactions pin WiredTiger snapshots until commit or abort. That snapshot prevents the storage engine from evicting old document versions. A single transaction left open for minutes can silently pin enough pages to push the cache into eviction pressure. An inactive-but-open transaction is worse than an active one because it holds the snapshot indefinitely with no forward progress.&lt;/p></description></item><item><title>MongoDB monitoring checklist: the signals every production cluster needs</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-monitoring-checklist/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-monitoring-checklist/</guid><description>&lt;h1 id="mongodb-monitoring-checklist-the-signals-every-production-cluster-needs">MongoDB monitoring checklist: the signals every production cluster needs&lt;/h1>
&lt;p>Production MongoDB failures are preceded by signals that are visible but often unmonitored: climbing dirty cache ratio, shrinking oplog window, or ticket counts approaching zero. This guide organizes essential signals into four monitoring levels. Use them to audit instrumentation or triage gaps during an incident.&lt;/p>
&lt;p>Each level builds on the previous one. If you are missing a survival signal, instrument it before adding expert metrics. The thresholds below are drawn from the MongoDB &lt;code>serverStatus()&lt;/code> and &lt;code>rs.status()&lt;/code> contract and from operational patterns observed across WiredTiger deployments.&lt;/p></description></item><item><title>MongoDB monitoring maturity model: from survival to expert</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-monitoring-maturity-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-monitoring-maturity-model/</guid><description>&lt;h1 id="mongodb-monitoring-maturity-model-from-survival-to-expert">MongoDB monitoring maturity model: from survival to expert&lt;/h1>
&lt;p>If you run MongoDB in production, you need a progression: what to watch first to know the database is alive, what to add next to know why it is slowing down, and what to track finally to predict a cascade before it becomes an outage.&lt;/p>
&lt;p>Treat the levels below as gates, not a shopping list. Automate and alert on Level 1 before you build Level 2 dashboards. If you are instrumenting Level 4 but lack a reliable page for disk space or member state, you have inverted your priorities.&lt;/p></description></item><item><title>MongoDB no primary / election storm: repeated elections and write outages</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-no-primary-election-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-no-primary-election-storm/</guid><description>&lt;h1 id="mongodb-no-primary--election-storm-repeated-elections-and-write-outages">MongoDB no primary / election storm: repeated elections and write outages&lt;/h1>
&lt;p>Applications log &amp;ldquo;not primary&amp;rdquo; errors. &lt;code>rs.status()&lt;/code> shows a different &lt;code>PRIMARY&lt;/code> than thirty seconds ago. MongoDB logs repeat &lt;code>&amp;quot;Starting an election&amp;quot;&lt;/code> and &lt;code>&amp;quot;Stepping down&amp;quot;&lt;/code>. Each election costs 2-12 seconds of write unavailability. More than two in ten minutes is an election storm.&lt;/p>
&lt;p>This pattern is more dangerous than a single failover because it creates rolling write outages that do not self-stabilize. Drivers reconnect, retry buffers fill, and application latency degrades even when a primary exists. Root causes usually fall into three categories: the primary is too slow to answer heartbeats, the network is dropping or delaying packets between members, or a misconfigured priority is forcing a healthy primary to step down.&lt;/p></description></item><item><title>MongoDB not master error: writes hitting a non-primary node after failover</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-not-master-error/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-not-master-error/</guid><description>&lt;h1 id="mongodb-not-master-error-writes-hitting-a-non-primary-node-after-failover">MongoDB not master error: writes hitting a non-primary node after failover&lt;/h1>
&lt;p>A node restart, network partition, or planned stepdown triggers a MongoDB election. Seconds later, application logs show &lt;code>NotWritablePrimary&lt;/code> (code 10107) or the legacy string &lt;code>not master and slaveOk=false&lt;/code>. Writes fail against a node that used to be PRIMARY, even though the cluster has elected a new one.&lt;/p>
&lt;p>This guide covers how to find the root cause and stop it from recurring.&lt;/p></description></item><item><title>MongoDB not primary and secondaryOk=false: reading from a secondary and how to fix it</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-not-primary-and-secondaryok-false/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-not-primary-and-secondaryok-false/</guid><description>&lt;h1 id="mongodb-not-primary-and-secondaryokfalse-reading-from-a-secondary-and-how-to-fix-it">MongoDB not primary and secondaryOk=false: reading from a secondary and how to fix it&lt;/h1>
&lt;p>Your application logs show &lt;code>NotPrimaryNoSecondaryOk&lt;/code> (code 13435) with the message &lt;code>&amp;quot;not master and slaveOk=false&amp;quot;&lt;/code>. Metrics show read failures against a specific host. The &lt;code>mongod&lt;/code> process is running, replica set heartbeats are clean, and replication lag looks normal. The cluster is not down. The error is a routing decision: a client sent a read to a replica set member that is not the primary, without declaring that reading from a non-primary is acceptable.&lt;/p></description></item><item><title>MongoDB noTimeout cursors causing cache pressure: pinned snapshots and silent eviction stalls</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-notimeout-cursors-cache-pressure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-notimeout-cursors-cache-pressure/</guid><description>&lt;h1 id="mongodb-notimeout-cursors-causing-cache-pressure-pinned-snapshots-and-silent-eviction-stalls">MongoDB noTimeout cursors causing cache pressure: pinned snapshots and silent eviction stalls&lt;/h1>
&lt;p>When &lt;code>wiredTiger.cache.bytes currently in the cache&lt;/code> climbs, the dirty ratio trends toward 20%, and read latencies spike without a single slow query in the log, check &lt;code>metrics.cursor.open.noTimeout&lt;/code>.&lt;/p>
&lt;p>Each noTimeout cursor pins a WiredTiger snapshot indefinitely. Old document versions cannot be evicted while that snapshot is open, so the cache fills with unreachable history until background eviction falls behind and application threads are forced to clean up. The result is a silent cache pressure cascade that looks like a capacity problem but is actually a cursor lifecycle problem.&lt;/p></description></item><item><title>MongoDB OOM-killed by the kernel: RSS, cache sizing, and oom_score_adj</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-oom-killed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-oom-killed/</guid><description>&lt;h1 id="mongodb-oom-killed-by-the-kernel-rss-cache-sizing-and-oom_score_adj">MongoDB OOM-killed by the kernel: RSS, cache sizing, and oom_score_adj&lt;/h1>
&lt;p>You find &lt;code>mongod&lt;/code> gone. The replica set has no primary. Applications time out. MongoDB logs show no graceful shutdown. Instead, &lt;code>dmesg&lt;/code> shows &lt;code>Out of memory: Killed process 12345 (mongod)&lt;/code>. The Linux OOM killer has reaped the process. MongoDB is a frequent target because its resident set size is usually the largest on the host.&lt;/p>
&lt;p>An OOM kill is not a MongoDB bug. It is the kernel freeing RAM by terminating the highest-scoring process. mongod&amp;rsquo;s RSS is dominated by the WiredTiger cache, plus roughly 1 MB per connection, plus roughly 500 MB to 1 GB of internal overhead for indexes, session buffers, and stack. When that sum comes within 1 GB of total RAM, the node is in the danger zone. The kill is abrupt: no stepdown, no replica set coordination, and after restart the cache must warm again.&lt;/p></description></item><item><title>MongoDB operation exceeded time limit (MaxTimeMSExpired): maxTimeMS and killed operations</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-operation-exceeded-time-limit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-operation-exceeded-time-limit/</guid><description>&lt;h1 id="mongodb-operation-exceeded-time-limit-maxtimemsexpired-maxtimems-and-killed-operations">MongoDB operation exceeded time limit (MaxTimeMSExpired): maxTimeMS and killed operations&lt;/h1>
&lt;p>Error code 50, &lt;code>MaxTimeMSExpired&lt;/code>, means the server killed an operation that exceeded its processing budget. Raising the timeout without fixing the root cause turns acute failures into chronic resource exhaustion. The operation was already pathologically slow; &lt;code>maxTimeMS&lt;/code> ended it before it consumed more resources or held locks and tickets indefinitely.&lt;/p>
&lt;p>&lt;code>maxTimeMS&lt;/code> sets a cumulative processing budget in milliseconds. MongoDB enforces it using the same interrupt mechanism as &lt;code>killOp&lt;/code>, terminating the operation only at designated interrupt points. Idle time between cursor batches does not count toward the limit, and on direct connections network latency is excluded from the server-side clock. On sharded clusters, however, latency between &lt;code>mongos&lt;/code> and shard &lt;code>mongod&lt;/code> instances counts against the limit. Distinguish a true &lt;code>MaxTimeMSExpired&lt;/code> from a client-side socket timeout, where the client gives up before the server responds.&lt;/p></description></item><item><title>MongoDB oplog window collapse: secondaries falling off and forced full resync</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-oplog-window-collapse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-oplog-window-collapse/</guid><description>&lt;h1 id="mongodb-oplog-window-collapse-secondaries-falling-off-and-forced-full-resync">MongoDB oplog window collapse: secondaries falling off and forced full resync&lt;/h1>
&lt;p>A secondary transitions to RECOVERING and logs &amp;ldquo;too stale to catch up.&amp;rdquo; The oplog window compresses from 48 hours to 90 minutes while replication lag on one secondary climbs steadily. These are the signatures of oplog window collapse: a write surge turns over the oplog faster than secondaries can consume it, and the safety margin between window and lag evaporates.&lt;/p></description></item><item><title>MongoDB oplog window too small: sizing the oplog for your write volume</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-oplog-window-too-small/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-oplog-window-too-small/</guid><description>&lt;h1 id="mongodb-oplog-window-too-small-sizing-the-oplog-for-your-write-volume">MongoDB oplog window too small: sizing the oplog for your write volume&lt;/h1>
&lt;p>The oplog window is the only thing standing between a routine secondary restart and a multi-hour full initial sync. It is a fixed-size capped collection that stores a variable amount of history. As your write volume grows, the window compresses. Most teams size the oplog once during initial deployment and never look at it again. Six months later, a routine maintenance window turns into an incident because the secondary fell off the oplog, entered RECOVERING, and forced a resync that saturated the remaining nodes.&lt;/p></description></item><item><title>MongoDB page faults high: working set exceeding memory after warmup</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-page-faults-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-page-faults-high/</guid><description>&lt;h1 id="mongodb-page-faults-high-working-set-exceeding-memory-after-warmup">MongoDB page faults high: working set exceeding memory after warmup&lt;/h1>
&lt;p>Hard page faults long after startup mean the active data set exceeds resident memory. On Linux, &lt;code>extra_info.page_faults&lt;/code> counts major faults: the OS read data from disk because the page was missing from both the WiredTiger cache and the OS page cache. A brief spike after restart is normal during warmup, but sustained faults mean the working set does not fit. On EBS gp3, 50 faults per second can degrade latency. On NVMe, hundreds per second may be tolerable, but neither is free. Confirm the cause, distinguish warmup from pressure, and reduce the fault rate without guessing.&lt;/p></description></item><item><title>MongoDB pages evicted by application threads: when eviction becomes user latency</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-application-thread-evictions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-application-thread-evictions/</guid><description>&lt;h1 id="mongodb-pages-evicted-by-application-threads-when-eviction-becomes-user-latency">MongoDB pages evicted by application threads: when eviction becomes user latency&lt;/h1>
&lt;p>Query p99 latency doubles or triples, but &lt;code>iostat&lt;/code> is not saturated and the slow query log shows no single offender. The signal is in &lt;code>db.serverStatus().wiredTiger.cache&lt;/code>: &lt;code>pages evicted by application threads&lt;/code> has moved from zero to a sustained nonzero rate.&lt;/p>
&lt;p>This metric marks the moment when WiredTiger&amp;rsquo;s dedicated eviction workers fall behind and application threads are drafted to do the work. Any sustained nonzero rate is abnormal. Once application threads evict, they perform page reconciliation and disk I/O inline with the request handler thread, directly inflating user-visible latency. The companion counter &lt;code>pages selected for eviction unable to be evicted&lt;/code> means eviction is stalled and the cache is effectively frozen.&lt;/p></description></item><item><title>MongoDB replica set member unhealthy: reading rs.status() states</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-replica-set-member-unhealthy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-replica-set-member-unhealthy/</guid><description>&lt;h1 id="mongodb-replica-set-member-unhealthy-reading-rsstatus-states">MongoDB replica set member unhealthy: reading rs.status() states&lt;/h1>
&lt;p>&lt;code>rs.status()&lt;/code> output is perspective-dependent and easy to misread. A member can show &lt;code>health: 1&lt;/code> while &lt;code>RECOVERING&lt;/code> and unable to serve reads, or appear &lt;code>UNKNOWN&lt;/code> from one node yet &lt;code>SECONDARY&lt;/code> from another because of an asymmetric firewall rule. &lt;code>health: 0&lt;/code> alone does not mean the process is dead, and &lt;code>health: 1&lt;/code> alone does not mean the node is healthy.&lt;/p>
&lt;p>This guide maps &lt;code>stateStr&lt;/code> values to failure modes and shows how to distinguish transient startup states, replication lag spirals, and network partitions.&lt;/p></description></item><item><title>MongoDB replication lag: detection, diagnosis, and fixes</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-replication-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-replication-lag/</guid><description>&lt;h1 id="mongodb-replication-lag-detection-diagnosis-and-fixes">MongoDB replication lag: detection, diagnosis, and fixes&lt;/h1>
&lt;p>Replication lag is the delay between the primary&amp;rsquo;s latest oplog entry and a secondary&amp;rsquo;s last applied entry. When lag grows faster than the oplog window, the secondary cannot catch up and requires a full initial sync, which can take hours to days. Until that happens, every second of lag erodes failover safety and read consistency.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>MongoDB replicates by having secondaries tail the primary&amp;rsquo;s oplog, a capped collection in &lt;code>local.oplog.rs&lt;/code>. The primary records every write with a timestamp; the secondary fetches entries and applies them locally. Lag is the delta between the primary&amp;rsquo;s &lt;code>optimeDate&lt;/code> and the secondary&amp;rsquo;s &lt;code>optimeDate&lt;/code> from &lt;code>rs.status()&lt;/code>.&lt;/p></description></item><item><title>MongoDB rollback after failover: silent data loss and the rollback directory</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-rollback-after-failover/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-rollback-after-failover/</guid><description>&lt;h1 id="mongodb-rollback-after-failover-silent-data-loss-and-the-rollback-directory">MongoDB rollback after failover: silent data loss and the rollback directory&lt;/h1>
&lt;p>A replica set member in &lt;code>ROLLBACK&lt;/code> state, or an application reporting vanished documents after failover, means a former primary held writes that never reached a majority. When that node rejoins, MongoDB erases the divergent history and writes the removed data to files under &lt;code>&amp;lt;dbPath&amp;gt;/rollback/&lt;/code>. The application may have received acknowledgment for those writes. With &lt;code>w:1&lt;/code>, acknowledgment meant only that the primary applied the write. It did not guarantee replication to a majority or survival through failover. That is silent data loss.&lt;/p></description></item><item><title>MongoDB RSS growing without cache growth: leaks, threads, and tcmalloc fragmentation</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-memory-rss-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-memory-rss-growing/</guid><description>&lt;h1 id="mongodb-rss-growing-without-cache-growth-leaks-threads-and-tcmalloc-fragmentation">MongoDB RSS growing without cache growth: leaks, threads, and tcmalloc fragmentation&lt;/h1>
&lt;p>&lt;code>db.serverStatus().mem.resident&lt;/code> climbs while WiredTiger cache utilization stays flat and the host is not swapping. Virtual memory is larger than RSS by design and is not an alert target. Only RSS reflects physical memory pressure. When RSS grows without cache growth, the problem lives outside the storage engine.&lt;/p>
&lt;p>This pattern points to one of three areas: tcmalloc heap retention and fragmentation, per-connection thread stack accumulation, or unbounded internal allocations from cursors, plan caches, or aggregation pipelines. Each connection reserves roughly 1 MB of stack space, so a connection storm can add gigabytes of RSS in minutes. TCMalloc caches freed memory in per-thread or per-CPU arenas, which inflates RSS independently of the WiredTiger cache.&lt;/p></description></item><item><title>MongoDB scanned objects ratio high: documents examined vs returned and wasted work</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-scanned-objects-ratio-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-scanned-objects-ratio-high/</guid><description>&lt;h1 id="mongodb-scanned-objects-ratio-high-documents-examined-vs-returned-and-wasted-work">MongoDB scanned objects ratio high: documents examined vs returned and wasted work&lt;/h1>
&lt;p>A high scanned-objects-to-returned-documents ratio means MongoDB examines far more documents than it returns. The alert usually fires as an Atlas query targeting event or a chart showing &lt;code>metrics.queryExecutor.scannedObjects&lt;/code> climbing faster than &lt;code>metrics.document.returned&lt;/code>. A ratio near 1:1 is efficient. A ratio above 1000:1 means the database examines roughly a thousand documents for every one it returns. Wasted work consumes read tickets, pushes unnecessary data through the WiredTiger cache, and often precedes latency spikes or ticket exhaustion.&lt;/p></description></item><item><title>MongoDB scatter-gather queries: when mongos fans out to every shard</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-scatter-gather-queries/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-scatter-gather-queries/</guid><description>&lt;h1 id="mongodb-scatter-gather-queries-when-mongos-fans-out-to-every-shard">MongoDB scatter-gather queries: when mongos fans out to every shard&lt;/h1>
&lt;p>In a sharded MongoDB cluster, mongos reads chunk-to-shard mappings from the config servers and routes each query to the smallest set of shards that can satisfy it. When the predicate includes the shard key, mongos targets one shard or a bounded subset. When it does not, mongos broadcasts the query to every shard that owns chunks for the collection and merges the results. This is a scatter-gather query.&lt;/p></description></item><item><title>MongoDB sharding hot shard: one shard saturating while others idle</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-sharding-hot-shard/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-sharding-hot-shard/</guid><description>&lt;h1 id="mongodb-sharding-hot-shard-one-shard-saturating-while-others-idle">MongoDB sharding hot shard: one shard saturating while others idle&lt;/h1>
&lt;p>Application latency climbs while aggregate CPU, I/O, and connection counts look healthy. Drill into individual shards and one node is pinned near 95% utilization while peers sit near 20%. &lt;code>sh.status()&lt;/code> shows an even chunk distribution. You have a hot shard.&lt;/p>
&lt;p>A hot shard occurs when one member of a sharded cluster receives a disproportionate share of read or write traffic. The cause is usually an access-pattern mismatch against the shard key, not a chunk-count imbalance. The overloaded shard saturates its WiredTiger cache and exhausts read or write tickets, pushing operations into queues. Because other shards are idle, aggregate cluster metrics hide the problem until the hot shard cascades into a latency spike or availability event.&lt;/p></description></item><item><title>MongoDB silent index regression: when a dropped index quietly becomes a collection scan</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-silent-index-regression/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-silent-index-regression/</guid><description>&lt;h1 id="mongodb-silent-index-regression-when-a-dropped-index-quietly-becomes-a-collection-scan">MongoDB silent index regression: when a dropped index quietly becomes a collection scan&lt;/h1>
&lt;p>Read latency on the primary doubles while connection counts and write throughput stay flat. There are no election events or cache pressure alerts. Traffic is unchanged. Yet p99 read latency climbs until operations time out.&lt;/p>
&lt;p>The slow query log shows queries that used to finish in milliseconds now taking seconds. The plans show &lt;code>COLLSCAN&lt;/code>. An index that existed last week is gone, or the query planner switched to a less efficient index after a cache invalidation. Because queries still return correct results, the regression is silent until it becomes an outage.&lt;/p></description></item><item><title>MongoDB slow query COLLSCAN: collection scans and the missing index</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-slow-query-collscan/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-slow-query-collscan/</guid><description>&lt;h1 id="mongodb-slow-query-collscan-collection-scans-and-the-missing-index">MongoDB slow query COLLSCAN: collection scans and the missing index&lt;/h1>
&lt;p>Queries that used to return in tens of milliseconds now breach application timeouts. Read latency climbs while write throughput stays flat. In the MongoDB slow query log, you see &lt;code>planSummary: &amp;quot;COLLSCAN&amp;quot;&lt;/code> attached to operations that should be indexed. A collection scan reads documents that will never be returned, wastes disk I/O, floods the WiredTiger cache with irrelevant data, and holds read tickets until the whole instance cascades into cache pressure.&lt;/p></description></item><item><title>MongoDB storage not reclaimed after delete: WiredTiger, compact, and resync</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-storage-not-reclaimed-after-delete/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-storage-not-reclaimed-after-delete/</guid><description>&lt;h1 id="mongodb-storage-not-reclaimed-after-delete-wiredtiger-compact-and-resync">MongoDB storage not reclaimed after delete: WiredTiger, compact, and resync&lt;/h1>
&lt;p>You deleted a large portion of a collection, and &lt;code>db.collection.stats()&lt;/code> confirms the logical size dropped. &lt;code>df -h&lt;/code> on the data volume does not. The filesystem blocks were not returned. WiredTiger maintains internal free-space lists and reclaims pages for future writes rather than shrinking files. Dropping a database or collection removes the underlying files and returns space to the OS immediately; this article addresses the case where documents are deleted but the collection files remain. This guide explains how to verify the state and the two operational paths to return blocks to the OS: the &lt;code>compact&lt;/code> command and replica set member resync.&lt;/p></description></item><item><title>MongoDB swapping: why mongod must never swap and how to tune the OS</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-swapping-and-swappiness/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-swapping-and-swappiness/</guid><description>&lt;h1 id="mongodb-swapping-why-mongod-must-never-swap-and-how-to-tune-the-os">MongoDB swapping: why mongod must never swap and how to tune the OS&lt;/h1>
&lt;p>Application timeouts climb. MongoDB latency jumps from milliseconds to seconds or minutes, yet &lt;code>mongod&lt;/code> is still running and accepting connections. CPU is low, disk I/O is not saturated, and the MongoDB log shows no errors. The process has not crashed. It has entered swap death. When the Linux kernel evicts mongod pages to swap, the database continues to function at roughly 1/1000th of normal speed. MongoDB relies on the WiredTiger cache and OS page cache to remain resident in RAM.&lt;/p></description></item><item><title>MongoDB ticket exhaustion: WiredTiger read/write tickets and queued operations</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-ticket-exhaustion/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-ticket-exhaustion/</guid><description>&lt;h1 id="mongodb-ticket-exhaustion-wiredtiger-readwrite-tickets-and-queued-operations">MongoDB ticket exhaustion: WiredTiger read/write tickets and queued operations&lt;/h1>
&lt;p>Your application times out while the OS shows idle CPU and disk utilisation looks survivable. The MongoDB log shows no obvious errors, yet operations stall. The likely cause is WiredTiger ticket exhaustion: the storage engine has run out of read or write concurrency tokens, and new work queues behind slow operations. Confirm ticket starvation, find the root cause, and fix it without raising the ticket limit.&lt;/p></description></item><item><title>MongoDB TLS certificate expiry: rotating certs without dropping connections</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-tls-certificate-expiry/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-tls-certificate-expiry/</guid><description>&lt;h1 id="mongodb-tls-certificate-expiry-rotating-certs-without-dropping-connections">MongoDB TLS certificate expiry: rotating certs without dropping connections&lt;/h1>
&lt;p>An expired TLS certificate does not degrade gracefully. In MongoDB, client drivers, replica set members, and mongos routers validate certificates during every TLS handshake. When the server certificate&amp;rsquo;s notAfter date passes, OpenSSL rejects the handshake immediately. Existing connections persist until they close, but nothing reconnects once they do. The result is a sudden cascade: secondaries miss heartbeats and transition to DOWN, application connection pools exhaust, and monitoring probes fail. During an active incident, check certificate dates first. For preventive work, your rotation strategy depends on whether you run MongoDB 5.0 or later.&lt;/p></description></item><item><title>MongoDB Too many open files: file descriptor exhaustion and ulimit tuning</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-too-many-open-files/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-too-many-open-files/</guid><description>&lt;h1 id="mongodb-too-many-open-files-file-descriptor-exhaustion-and-ulimit-tuning">MongoDB Too many open files: file descriptor exhaustion and ulimit tuning&lt;/h1>
&lt;p>Connection timeouts appear in application logs. MongoDB logs show &lt;code>Too many open files&lt;/code> or &lt;code>error accepting new connection&lt;/code>. New secondaries fail to sync, or a stable node rejects connections after restart. The &lt;code>mongod&lt;/code> process hit the OS file descriptor limit. The failure is often silent until a dependent system breaks.&lt;/p>
&lt;p>FD exhaustion is not always about connection count. &lt;!-- TODO: verify whether WiredTiger holds every collection/index file open indefinitely or only active ones --> WiredTiger maintains open file descriptors for data files, indexes, and journals. A dense deployment with thousands of collections can hold tens of thousands of FDs in steady state. A connection surge, index build, or restarted node rebuilding caches can push the process over the limit. MongoDB then cannot accept new connections, open new data files, or continue replication.&lt;/p></description></item><item><title>MongoDB too stale to catch up: secondary stuck in RECOVERING and how to resync</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-too-stale-to-catch-up/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-too-stale-to-catch-up/</guid><description>&lt;h1 id="mongodb-too-stale-to-catch-up-secondary-stuck-in-recovering-and-how-to-resync">MongoDB too stale to catch up: secondary stuck in RECOVERING and how to resync&lt;/h1>
&lt;p>You check &lt;code>rs.status()&lt;/code> during an incident and see a member stuck in &lt;code>RECOVERING&lt;/code> with an &lt;code>errmsg&lt;/code> reading &lt;code>error RS102 too stale to catch up&lt;/code>. The node is alive but will never transition back to &lt;code>SECONDARY&lt;/code> on its own. Its last replicated oplog entry is older than the oldest entry still available on the primary, so the history it needs has already been overwritten. Incremental replication is impossible from this state. The only path forward is a full initial sync, which on large datasets can take hours to days, adds significant read load to the sync source, and leaves the cluster with reduced redundancy until it completes. If the stale member is a voting node, you are now one failure away from losing majority. This guide covers how to confirm the condition, identify why the secondary fell off, and recover without pushing the remaining cluster members into the same trap.&lt;/p></description></item><item><title>MongoDB unused indexes: $indexStats, write amplification, and safe removal</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-unused-indexes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-unused-indexes/</guid><description>&lt;h1 id="mongodb-unused-indexes-indexstats-write-amplification-and-safe-removal">MongoDB unused indexes: $indexStats, write amplification, and safe removal&lt;/h1>
&lt;p>Every insert and delete updates all indexes on a MongoDB collection; every update that modifies an indexed field updates every index containing that field. An unused index consumes WiredTiger cache space, increases write latency, and amplifies disk I/O. Over time, redundant indexes accumulate from schema migrations, abandoned query patterns, and exploratory tuning.&lt;/p>
&lt;p>The &lt;code>$indexStats&lt;/code> aggregation stage exposes per-index operation counts, but counters reset on mongod restart and internal operations can inflate values. This guide covers detecting truly unused indexes, validating redundancy, and removing them without causing query regressions.&lt;/p></description></item><item><title>MongoDB w:majority write concern timeout (wtimeout): replication lag and at-risk writes</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-write-concern-timeout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-write-concern-timeout/</guid><description>&lt;h1 id="mongodb-wmajority-write-concern-timeout-wtimeout-replication-lag-and-at-risk-writes">MongoDB w:majority write concern timeout (wtimeout): replication lag and at-risk writes&lt;/h1>
&lt;p>Your application logs show write concern timeouts, or worse, the driver returned an error that the application swallowed and moved on. The write succeeded on the primary, but the cluster could not confirm it across a majority of data-bearing members before the deadline expired. If the primary crashes right now, that data is gone. This article explains how to diagnose the root cause, whether it is replication lag, a down secondary, or network saturation, and what to do before the next primary failure.&lt;/p></description></item><item><title>MongoDB WiredTiger cache dirty ratio high: the leading indicator nobody watches</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-cache-dirty-ratio-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-cache-dirty-ratio-high/</guid><description>&lt;h1 id="mongodb-wiredtiger-cache-dirty-ratio-high-the-leading-indicator-nobody-watches">MongoDB WiredTiger cache dirty ratio high: the leading indicator nobody watches&lt;/h1>
&lt;p>Cache fill at 70% looks safe, but if dirty ratio is climbing past 15%, a latency spike is already forming. Dirty ratio measures modified pages not yet flushed to disk. While fill ratio tells you how much cache is in use, dirty ratio tells you how fast the storage engine is falling behind. It often leads checkpoint stalls and eviction-driven latency spikes by minutes.&lt;/p></description></item><item><title>MongoDB WiredTiger cache pressure cascade: eviction stalls and latency spikes</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-cache-pressure-cascade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-cache-pressure-cascade/</guid><description>&lt;h1 id="mongodb-wiredtiger-cache-pressure-cascade-eviction-stalls-and-latency-spikes">MongoDB WiredTiger cache pressure cascade: eviction stalls and latency spikes&lt;/h1>
&lt;p>Latency jumps from milliseconds to seconds for both reads and writes. The slow query log shows no single offender, but connection count climbs as clients retry and timeout. This is the cache pressure cascade. It starts in the storage engine and becomes a self-reinforcing spiral through replication, admission control, and connection handling. This guide covers the mechanism, confirmation under pressure, and how to stop it.&lt;/p></description></item><item><title>MongoDB WriteConflict errors: optimistic concurrency retries under contention</title><link>https://www.netdata.cloud/guides/mongodb/mongodb-writeconflict-errors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/mongodb-writeconflict-errors/</guid><description>&lt;h1 id="mongodb-writeconflict-errors-optimistic-concurrency-retries-under-contention">MongoDB WriteConflict errors: optimistic concurrency retries under contention&lt;/h1>
&lt;p>WriteConflict exceptions (error 112) in application logs, or unexplained write latency spikes, point to document-level contention under WiredTiger optimistic concurrency control. Outside of transactions, MongoDB retries single-document writes internally; the client sees slower responses rather than errors. Inside multi-document transactions, MongoDB aborts immediately and returns error 112. Either way, the root cause is concurrent writers targeting the same document.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>WiredTiger uses optimistic concurrency control at the document level. Two concurrent writes to the same document do not block indefinitely; one proceeds and the other encounters a conflict.&lt;/p></description></item></channel></rss>