<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MongoDB on Netdata</title><link>https://www.netdata.cloud/tags/mongodb/</link><description>Recent content in MongoDB on Netdata</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 31 Aug 2026 22:01:02 +0300</lastBuildDate><atom:link href="https://www.netdata.cloud/tags/mongodb/index.xml" rel="self" type="application/rss+xml"/><item><title>Best MongoDB Monitoring Tools (10 Ranked for 2026)</title><link>https://www.netdata.cloud/resources/best-mongodb-monitoring-tools/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/resources/best-mongodb-monitoring-tools/</guid><description/></item><item><title>Database Performance Monitoring: 14+ DBs Supported</title><link>https://www.netdata.cloud/blog/dbm/</link><pubDate>Fri, 24 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/blog/dbm/</guid><description>&lt;p&gt;&lt;img src="../images/dbm-hero.svg" alt="Database Performance Monitoring: Query-Level Visibility Across 14+ Databases"&gt;&lt;/p&gt;&#10;&lt;p&gt;Netdata has always collected database metrics: connections, throughput, replication lag, buffer cache hit ratios, and so on. These tell you that something is wrong, but they don&amp;rsquo;t tell you why. When your PostgreSQL response time spikes, the metric alone doesn&amp;rsquo;t tell you which query is responsible. For that, you&amp;rsquo;ve traditionally needed to SSH into the box, connect to the database, and run diagnostic queries manually. Or set up a separate database monitoring tool entirely.&lt;/p&gt;</description></item><item><title>Database Monitoring Software Without Query Languages</title><link>https://www.netdata.cloud/solutions/built-for/dbas/</link><pubDate>Tue, 27 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/solutions/built-for/dbas/</guid><description>Netdata gives DBAs complete database visibility with per-second query performance, replication lag tracking, lock analysis, and connection pool monitoring across MySQL, PostgreSQL, SQL Server, Oracle, and MongoDB - all from one dashboard with zero configuration.</description></item><item><title>Database Monitoring Software With Real-Time Visibility</title><link>https://www.netdata.cloud/solutions/use-cases/database-monitoring/</link><pubDate>Thu, 18 Dec 2025 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/solutions/use-cases/database-monitoring/</guid><description>Real-time database monitoring with AI-powered troubleshooting, zero configuration, and predictable costs. Monitor 15+ database platforms with per-second granularity and ML-based anomaly detection.</description></item><item><title>How to Troubleshoot Slow Queries in MongoDB</title><link>https://www.netdata.cloud/academy/how-to-troubleshoot-slow-queries-in-mongodb/</link><pubDate>Mon, 27 May 2024 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/academy/how-to-troubleshoot-slow-queries-in-mongodb/</guid><description>&lt;p&gt;MongoDB is a popular NoSQL database known for its flexibility and scalability. However, as with any database system, you might encounter slow queries that can impact the &lt;a href="https://www.netdata.cloud/academy/what-is-application-performance-monitoring-apm/"&gt;performance of your application&lt;/a&gt;. In this guide, we’ll walk you through the steps to troubleshoot and optimize slow queries in MongoDB, ensuring your database runs efficiently.&lt;/p&gt;&#10;&lt;h2 id="understanding-the-basics"&gt;Understanding the Basics&lt;/h2&gt;&#10;&lt;p&gt;Before diving into troubleshooting, it&amp;rsquo;s important to understand some basic concepts in MongoDB:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Collections and Documents:&lt;/strong&gt; MongoDB stores data in collections, which are analogous to tables in relational databases. Each collection contains documents, which are JSON-like data structures.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Indexes:&lt;/strong&gt; Indexes improve query performance by allowing the database to quickly locate the data without scanning every document.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Query Plans:&lt;/strong&gt; MongoDB evaluates different ways to execute a query and chooses the most efficient plan.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="identifying-slow-queries"&gt;Identifying Slow Queries&lt;/h3&gt;&#10;&lt;p&gt;Using the &lt;code&gt;slowms&lt;/code&gt; Parameter&#10;MongoDB logs operations that take longer than a specified threshold. By default, this threshold (&lt;code&gt;slowms&lt;/code&gt;) is set to 100 milliseconds. You can adjust this setting to catch slower operations more effectively:&lt;/p&gt;</description></item><item><title>Release 1.21: New Collectors &amp; Faster Exporters</title><link>https://www.netdata.cloud/blog/release-1-21/</link><pubDate>Mon, 06 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/blog/release-1-21/</guid><description>&lt;!--truncate--&gt;&#10;&lt;div class="et_pb_module et_pb_text et_pb_text_0 et_pb_text_align_left et_pb_bg_layout_light"&gt;&#10;&lt;div class="et_pb_text_inner"&gt;&#10;&lt;img class="alignnone size-full wp-image-16737" src="../wp-archive/uploads/2022/03/release-1.21.0.png" alt="" width="1200" height="600" /&gt;&#10;&lt;p&gt;We’re in the middle of a scary, uncertain time, and we hope those of you reading are staying safe and healthy.&lt;/p&gt;&#10;&lt;p&gt;Despite the current challenges, the 40+ members of the &lt;a title="Netdata Remote Working" href="https://staging-www.netdata.cloud/blog/culture/netdata-remote-working/"&gt;remote-first Netdata&lt;/a&gt; team have been hard at work on the next version of the Netdata Agent: v1.21.0.&lt;/p&gt;&#10;&lt;p&gt;This release is foundational: While we do have fantastic new collectors and three new ways to export your metrics for long-term storage, many of the most significant changes aren’t even those you’ll notice. While they may be beneath the hood, they’re going to power some amazing new features, UX improvements, and design overhauls.&lt;/p&gt;</description></item><item><title>Release 1.17: Collection frequency gets flexible</title><link>https://www.netdata.cloud/blog/release-1-17/</link><pubDate>Mon, 09 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/blog/release-1-17/</guid><description>&lt;!--truncate--&gt;&#10;&lt;p&gt;The next version of Netdata has arrived! Aside from dozens of quality-of-life and papercut fixes, we’ve launched some new features we know you’ll be excited to use straight away.&lt;/p&gt;&#10;&lt;p&gt;Let’s dive in.&lt;/p&gt;&#10;&lt;h2&gt;What’s new?&lt;/h2&gt;&#10;Release v1.17.0 contains 38 bug fixes, 33 improvements, and 20 documentation updates.&#10;&lt;p&gt;You can, of course, view the full list at the &lt;a href="https://github.com/netdata/netdata/releases/tag/v1.17.0"&gt;v1.17.0 release notes&lt;/a&gt; on GitHub. But, let’s talk details on a few of the improvements and changes most requested by the Netdata community.&lt;/p&gt;</description></item><item><title>MongoDB Application Thread Evictions: How To Fix</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;p&gt;Query p99 latency doubles or triples, but &lt;code&gt;iostat&lt;/code&gt; is not saturated and the slow query log shows no single offender. The signal is in &lt;code&gt;db.serverStatus().wiredTiger.cache&lt;/code&gt;: &lt;code&gt;pages evicted by application threads&lt;/code&gt; has moved from zero to a sustained nonzero rate.&lt;/p&gt;&#10;&lt;p&gt;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&gt;pages selected for eviction unable to be evicted&lt;/code&gt; means eviction is stalled and the cache is effectively frozen.&lt;/p&gt;</description></item><item><title>MongoDB Balancer Stuck On Jumbo Chunks: 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;p&gt;One shard is hot while the others idle. &lt;code&gt;sh.status()&lt;/code&gt; 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&gt;&#10;&lt;p&gt;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&gt;jumbo&lt;/code&gt; in &lt;code&gt;config.chunks&lt;/code&gt; 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&gt;</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;p&gt;When MongoDB latency doubles and disk read IOPS climb, operators usually check indexes and the query planner first. If &lt;code&gt;db.currentOp()&lt;/code&gt; shows no runaway query and the slow query log is quiet, the culprit is often the WiredTiger cache.&lt;/p&gt;&#10;&lt;p&gt;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&gt;max(0.5 * (RAM - 1 GB), 256 MB)&lt;/code&gt;. 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&gt;</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;p&gt;You notice &lt;code&gt;transaction checkpoint most recent time (msecs)&lt;/code&gt; 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&gt;</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;p&gt;Writes time out or hang while &lt;code&gt;mongod&lt;/code&gt; is running, TCP port 27017 is open, and reads still return results from cache. The MongoDB logs are quiet, but &lt;code&gt;db.serverStatus().opcounters&lt;/code&gt; 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&gt;</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;p&gt;&lt;code&gt;db.serverStatus().connections&lt;/code&gt; can show low &lt;code&gt;current&lt;/code&gt; and a rapidly climbing &lt;code&gt;totalCreated&lt;/code&gt;. That mismatch is connection churn: connections open and close rapidly instead of being reused. MongoDB allocates server-side state for every new connection; in thread-per-connection deployments, 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&gt;&#10;&lt;p&gt;For the broader mental model, see &lt;a &gt;How MongoDB actually works in production: a mental model for operators&lt;/a&gt;. For the cascade after a failover, see &lt;a href="https://www.netdata.cloud/guides/mongodb/mongodb-connection-storm-spiral/"&gt;MongoDB connection storm spiral: reconnection floods after an election or deploy&lt;/a&gt;.&lt;/p&gt;</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;p&gt;Application logs show connection timeouts. MongoDB logs show &lt;code&gt;connection refused&lt;/code&gt; or &lt;code&gt;error accepting new connection&lt;/code&gt;. &lt;code&gt;db.serverStatus().connections&lt;/code&gt; shows &lt;code&gt;current&lt;/code&gt; 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&gt;&#10;&lt;p&gt;MongoDB uses a one-thread-per-connection model. Each accepted connection consumes two file descriptors and a thread stack sized by the OS &lt;code&gt;ulimit -s&lt;/code&gt;. While &lt;code&gt;maxIncomingConnections&lt;/code&gt; sets the logical inbound cap, the OS file-descriptor limit (&lt;code&gt;ulimit -n&lt;/code&gt;) usually enforces the actual ceiling. Rejections happen before the connection handshake completes, so &lt;code&gt;serverStatus().connections.current&lt;/code&gt; never counts refused connections. Look at logs, ratios, and OS-level resource counts to find the real limit.&lt;/p&gt;</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;p&gt;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&gt;&#10;&lt;p&gt;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. 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&gt;</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;p&gt;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&gt;&#10;&lt;p&gt;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&gt;</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;p&gt;When &lt;code&gt;opLatencies.writes&lt;/code&gt; climbs and &lt;code&gt;globalLock.currentQueue&lt;/code&gt; grows, &lt;code&gt;db.serverStatus().wiredTiger.transaction&lt;/code&gt; often shows the most recent checkpoint took 45 seconds. WiredTiger metrics tell you &lt;em&gt;what&lt;/em&gt; is hurting, but they do not tell you &lt;em&gt;why&lt;/em&gt;. The next question is whether the disk is actually saturated.&lt;/p&gt;&#10;&lt;p&gt;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&gt;iostat -x&lt;/code&gt;) with WiredTiger internal signals in the same time window. This guide shows how to do that safely during an incident.&lt;/p&gt;</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;p&gt;Application logs show code 292 (&lt;code&gt;QueryExceededMemoryLimitNoDiskUseAllowed&lt;/code&gt;), or an aggregation pipeline slows by an order of magnitude. Eligible blocking aggregation stages are 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&gt;&#10;&lt;p&gt;Before MongoDB 6.0, you had to explicitly opt in to disk spilling with &lt;code&gt;{ allowDiskUse: true }&lt;/code&gt;. Starting in 6.0, the &lt;code&gt;allowDiskUseByDefault&lt;/code&gt; server parameter is &lt;code&gt;true&lt;/code&gt;, so eligible stages spill automatically. That removes the hard failure for many pipelines, but it also makes it easier for heavy workloads to hide behind disk I/O instead of failing fast. The &lt;code&gt;$push&lt;/code&gt; and &lt;code&gt;$addToSet&lt;/code&gt; accumulators inside &lt;code&gt;$group&lt;/code&gt; cannot spill to disk regardless of the setting. &lt;code&gt;$graphLookup&lt;/code&gt; can spill when allowed by &lt;code&gt;allowDiskUse&lt;/code&gt;; it returns an error only when spilling is prohibited.&lt;/p&gt;</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;p&gt;A &lt;code&gt;mongod&lt;/code&gt; 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&gt;&#10;&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;&#10;&lt;p&gt;MongoDB&amp;rsquo;s &lt;code&gt;net.bindIp&lt;/code&gt; controls which interfaces accept connections. Modern packages default &lt;code&gt;bindIp&lt;/code&gt; to &lt;code&gt;127.0.0.1&lt;/code&gt;; exposure usually follows an explicit override to a wildcard such as &lt;code&gt;0.0.0.0&lt;/code&gt; or &lt;code&gt;::&lt;/code&gt;. Without authentication, any reachable host can list databases, read or write documents, and execute administrative commands.&lt;/p&gt;</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;p&gt;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&gt;j:true&lt;/code&gt; or &lt;code&gt;w:&amp;quot;majority&amp;quot;&lt;/code&gt; blocks until the journal buffer is fsynced to disk. When storage struggles, journal sync is the first domino to fall.&lt;/p&gt;&#10;&lt;p&gt;Journal sync latency is a storage subsystem signal, not a query or cache problem. The block device under &lt;code&gt;mongod&lt;/code&gt; 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&gt;</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;p&gt;When p99 latency jumps and &lt;code&gt;globalLock.currentQueue&lt;/code&gt; grows, check &lt;code&gt;serverStatus().locks&lt;/code&gt;. If &lt;code&gt;timeAcquiringMicros&lt;/code&gt; is climbing for &lt;code&gt;Collection&lt;/code&gt; or &lt;code&gt;Metadata&lt;/code&gt;, the cause is almost always DDL: &lt;code&gt;createIndexes&lt;/code&gt;, &lt;code&gt;dropIndexes&lt;/code&gt;, &lt;code&gt;collMod&lt;/code&gt;, &lt;code&gt;renameCollection&lt;/code&gt;, 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&gt;</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;p&gt;Your application latency just spiked. &lt;code&gt;opLatencies&lt;/code&gt; show reads and writes climbing. &lt;code&gt;globalLock.currentQueue&lt;/code&gt; is no longer zero. You check &lt;code&gt;db.serverStatus().wiredTiger.concurrentTransactions&lt;/code&gt;: available tickets are near zero, but throughput has not increased. An operation is holding a ticket without making progress.&lt;/p&gt;&#10;&lt;p&gt;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 MongoDB ≤6.x (7.0+ dynamically adjusts, capped at 128), 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&gt;</description></item><item><title>MongoDB Monitoring</title><link>https://www.netdata.cloud/monitoring-101/mongodb-monitoring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/monitoring-101/mongodb-monitoring/</guid><description>&lt;h2 id="mongodb-monitoring"&gt;MongoDB Monitoring&lt;/h2&gt;&#10;&lt;h3 id="what-is-mongodb"&gt;What Is MongoDB?&lt;/h3&gt;&#10;&lt;p&gt;MongoDB is a leading NoSQL database platform designed for flexibility, scalability, and performance. It is used to store documents in a flexible, JSON-like format, which makes it perfect for handling large volumes of unstructured data. For more insights, check out &lt;a href="https://www.mongodb.com/"&gt;MongoDB&amp;rsquo;s official site&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h3 id="monitoring-mongodb-with-netdata"&gt;Monitoring MongoDB With Netdata&lt;/h3&gt;&#10;&lt;p&gt;Netdata provides comprehensive monitoring for MongoDB, allowing users to gain real-time insights into their MongoDB servers. By utilizing the &lt;a href="https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/mongodb/"&gt;MongoDB monitoring tool from Netdata&lt;/a&gt;, users can track critical metrics and enhance their troubleshooting capabilities.&lt;/p&gt;</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;p&gt;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&gt;&#10;&lt;p&gt;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&gt;serverStatus()&lt;/code&gt; and &lt;code&gt;rs.status()&lt;/code&gt; contract and from operational patterns observed across WiredTiger deployments.&lt;/p&gt;</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;p&gt;Applications log &amp;ldquo;not primary&amp;rdquo; errors. &lt;code&gt;rs.status()&lt;/code&gt; shows a different &lt;code&gt;PRIMARY&lt;/code&gt; than thirty seconds ago. MongoDB logs repeat &lt;code&gt;&amp;quot;Starting an election&amp;quot;&lt;/code&gt; and &lt;code&gt;&amp;quot;Stepping down&amp;quot;&lt;/code&gt;. Each election costs 2-12 seconds of write unavailability. More than two in ten minutes is an election storm.&lt;/p&gt;&#10;&lt;p&gt;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&gt;</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;p&gt;A node restart, network partition, or planned stepdown triggers a MongoDB election. Seconds later, application logs show &lt;code&gt;NotWritablePrimary&lt;/code&gt; (code 10107) or the legacy string &lt;code&gt;not master and slaveOk=false&lt;/code&gt;. Writes fail against a node that used to be PRIMARY, even though the cluster has elected a new one.&lt;/p&gt;&#10;&lt;p&gt;This guide covers how to find the root cause and stop it from recurring.&lt;/p&gt;&#10;&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;&#10;&lt;p&gt;MongoDB replica sets elect exactly one PRIMARY at a time. When a failover occurs, the old primary steps down and a secondary is promoted. Application drivers discover the new topology through the replica set seed list and refresh their connection pools automatically. Between stepdown and election completion, there is a brief window with no writable primary. After the new primary is elected, drivers should route writes there.&lt;/p&gt;</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;p&gt;Your application logs show &lt;code&gt;NotPrimaryNoSecondaryOk&lt;/code&gt; (code 13435) with the message &lt;code&gt;&amp;quot;not primary and secondaryOk=false&amp;quot;&lt;/code&gt; on hello-capable clients (or &lt;code&gt;&amp;quot;not master and slaveOk=false&amp;quot;&lt;/code&gt; on legacy clients). Metrics show read failures against a specific host. The &lt;code&gt;mongod&lt;/code&gt; 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&gt;</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;p&gt;You find &lt;code&gt;mongod&lt;/code&gt; gone. The replica set has no primary. Applications time out. MongoDB logs show no graceful shutdown. Instead, &lt;code&gt;dmesg&lt;/code&gt; shows &lt;code&gt;Out of memory: Killed process 12345 (mongod)&lt;/code&gt;. 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&gt;&#10;&lt;p&gt;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&gt;</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;p&gt;Error code 50, &lt;code&gt;MaxTimeMSExpired&lt;/code&gt;, 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&gt;maxTimeMS&lt;/code&gt; ended it before it consumed more resources or held locks and tickets indefinitely.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;maxTimeMS&lt;/code&gt; sets a cumulative processing budget in milliseconds. MongoDB enforces it using the same interrupt mechanism as &lt;code&gt;killOp&lt;/code&gt;, 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&gt;mongos&lt;/code&gt; and shard &lt;code&gt;mongod&lt;/code&gt; instances counts against the limit. Distinguish a true &lt;code&gt;MaxTimeMSExpired&lt;/code&gt; from a client-side socket timeout, where the client gives up before the server responds.&lt;/p&gt;</description></item><item><title>MongoDB Operations Guides</title><link>https://www.netdata.cloud/guides/mongodb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/mongodb/</guid><description>How MongoDB actually fails in production, what the early warning signals look like, and the runbooks for the symptoms you&amp;rsquo;ll see in real incidents.</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;p&gt;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&gt;&#10;&lt;p&gt;Once a secondary falls behind the oldest entry in the primary&amp;rsquo;s oplog, its sync position no longer exists. Recovery requires a full initial sync, which can take hours to days depending on data size and network throughput. During recovery, the replica set runs with reduced redundancy. If another secondary is near the edge, the remaining members absorb increased read load that can push them toward the same fate.&lt;/p&gt;</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;p&gt;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&gt;</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;p&gt;A high page-fault rate long after startup can mean the active data set exceeds resident memory. &lt;code&gt;extra_info.page_faults&lt;/code&gt; is platform-dependent; on Windows, MongoDB counts both hard and soft faults, so correlate the rate with OS-level disk-read/major-fault metrics. 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&gt;</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;p&gt;A replica set member in &lt;code&gt;ROLLBACK&lt;/code&gt; 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&gt;&amp;lt;dbPath&amp;gt;/rollback/&lt;/code&gt;. The application may have received acknowledgment for those writes. With &lt;code&gt;w:1&lt;/code&gt;, 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&gt;</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;p&gt;&lt;code&gt;db.serverStatus().mem.resident&lt;/code&gt; 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&gt;&#10;&lt;p&gt;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&gt;</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;p&gt;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&gt;&#10;&lt;p&gt;The slow query log shows queries that used to finish in milliseconds now taking seconds. The plans show &lt;code&gt;COLLSCAN&lt;/code&gt;. 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&gt;</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;p&gt;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&gt;planSummary: &amp;quot;COLLSCAN&amp;quot;&lt;/code&gt; 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&gt;</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;p&gt;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&gt;&#10;&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;&#10;&lt;p&gt;WiredTiger uses ticket-based admission control. Every operation that touches the storage engine must acquire a read or write ticket before it proceeds. In MongoDB 6.x and earlier, the default is 128 read and 128 write tickets per node. MongoDB 7.0 introduced a dynamic &lt;code&gt;throughputProbing&lt;/code&gt; algorithm that adjusts the active ceiling downward from 128 under light load, scaling up under demand but never exceeding 128. In MongoDB 8.0+, the metrics moved from &lt;code&gt;wiredTiger.concurrentTransactions&lt;/code&gt; to &lt;code&gt;queues.execution&lt;/code&gt;, adding queue-length and timing fields that help distinguish true congestion from a low adaptive baseline.&lt;/p&gt;</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;p&gt;You check &lt;code&gt;rs.status()&lt;/code&gt; during an incident and see a member stuck in &lt;code&gt;RECOVERING&lt;/code&gt; with a stale-oplog error. Older releases reported &lt;code&gt;error RS102 too stale to catch up&lt;/code&gt;; newer releases log &lt;code&gt;Too stale to catch up&lt;/code&gt; and return &lt;code&gt;TooStaleToSyncFromSource&lt;/code&gt; internally. The node is alive but will never transition back to &lt;code&gt;SECONDARY&lt;/code&gt; 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&gt;</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;p&gt;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&gt;&#10;&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;&#10;&lt;p&gt;WiredTiger tracks dirty bytes against the configured maximum cache size. Dirty ratio equals &lt;code&gt;tracked dirty bytes in the cache&lt;/code&gt; divided by &lt;code&gt;maximum bytes configured&lt;/code&gt;. Checkpoints run every 60 seconds by default to flush these pages. When write volume exceeds flush capacity, dirty data accumulates.&lt;/p&gt;</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;p&gt;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&gt;&#10;&lt;h2 id="what-this-means"&gt;What this means&lt;/h2&gt;&#10;&lt;p&gt;WiredTiger uses an in-memory cache separate from the OS page cache. The default maximum is the larger of 50% of (RAM − 1 GB), or 256 MB. Writes land in cache as dirty pages; checkpoints flush them to disk every 60 seconds by default. Background eviction threads keep cache fill near 80% and dirty pages under control.&lt;/p&gt;</description></item><item><title>Webinar: Live Database &amp; Network Diagnostics</title><link>https://www.netdata.cloud/webinars/live-functions-database-network-monitoring/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/webinars/live-functions-database-network-monitoring/</guid><description/></item></channel></rss>