Merge Backlogs and Too Many Parts Errors
Five distinct causes produce this error, and each needs its own fix.

Merge backlogs and Too Many Parts errors come from the same imbalance, as inserts create parts faster than background merges can consolidate them. But that imbalance has several causes, each calling for a different fix.
Why inserts and merges race each other, and what that race produces
MergeTree writes each INSERT as a new immutable part on disk. Background merges then join those parts into larger ones. The two processes run under different constraints. Part creation is bounded by how quickly clients issue INSERT statements, while consolidation depends on the CPU threads and disk throughput available to background work.
When that imbalance persists, the number of parts climbs. The engine first delays new inserts, then rejects them with a Too Many Parts error. What does the error actually reveal? It signals that accumulated parts have crossed a guardrail. The distinction is important because the error describes the result of the race without identifying what made consolidation fall behind.
How the delay and throw thresholds work, and why the defaults changed
Two settings govern the engine’s response to that growing count. The delay threshold slows incoming inserts, while the throw threshold rejects them entirely. These are separate stages of the same response. A workload can encounter slower ingestion before it reaches outright rejection, so the appearance of the error is not the first sign of pressure.
From version 23.6 onward, the defaults were raised significantly compared with earlier versions. That change allowed a larger accumulation of parts before the default controls intervened. It did not change the underlying race. In particular, parts_to_throw_insert measures the point at which the engine rejects inserts.
Five root causes that all produce the same error through different paths
High-frequency small inserts are the most common cause. Each INSERT creates at least one new part per affected partition, so an application writing row-by-row or once per event generates a steady stream of consolidation work. The write pattern itself drives the backlog. Diagnosis therefore needs to account for both how much data arrives and how many separate inserts bring it.
Parts accumulate independently within each partition, so partitioning by hour or a high-cardinality key such as tenant ID multiplies the number of places where they can build up. The effective throw limit is multiplied across active partitions. Hourly and daily partitioning are among the top causes of incidents, so teams need to check the partition layout when looking for the cause, as well as when deciding how to organize data. Small inserts and many active partitions can compound each other because each insert can affect more than one partition.
Merge pool saturation can produce the same error without either write pattern being the sole explanation. background_pool_size and background_merges_mutations_concurrency_ratio constrain concurrent merge tasks. Many tables may compete for that capacity. When the pool fills, new parts continue to arrive while consolidation cannot gain enough ground. In this case, the distinguishing question is whether the available background workers are already occupied, rather than whether the throw threshold is unusually low.
Large mutations are a specific way to consume that shared capacity. ALTER TABLE... UPDATE and ALTER TABLE ... DELETE use threads from the same pool as merges. A wide-scope mutation on a large table can saturate the pool for its duration, allowing incoming parts to accumulate while normal merges stall. The resulting error can look like an ingestion problem even though the immediate change was a large update or deletion.
Replication trouble creates a fifth diagnostic path when parts accumulate on lagging replicas. Here, Keeper health or the network may be the source of the problem. A backlog on a lagging replica calls for a different investigation from a pool saturated by mutations. Treating both as a lack of merge concurrency risks changing a setting that leaves the cause of the backlog in place.
Trigger.dev experienced intermittent failures ingesting OpenTelemetry trace data between November 28 and December 1, 2025. In that time-series workload, the insert rate outpaced merges. The incident gives the mechanism a concrete consequence. It does not, by itself, establish which of the five causes dominated or what a system-table investigation revealed. That limit is worth preserving because an observed ingestion failure and a demonstrated root cause are not the same evidence.
Fixes ordered by leverage, from highest impact to emergency stopgap

The first step should be to batch more rows together. Targeting a large number of rows per insert and an adequate payload size reduces the rate at which new parts are created. This changes the workload at its source. It should come before other changes because making fewer parts gives the background pool less work to do, whereas a higher rejection threshold allows more unfinished work to accumulate. The first question for a team facing repeated errors is whether its application can combine writes before sending them.
For workloads that cannot batch at the application layer, async inserts let the server accumulate rows from multiple clients before flushing. Since version 24.2, async_insert_use_adaptive_busy_timeout adjusts that flush window dynamically between a minimum and maximum bound. But async inserts and Buffer tables only put off hitting the Too Many Parts wall. They work best with batching where it is possible, because MergeTree is built for batch writes.
Changing the partition layout comes next when it multiplies the places where parts build up. Switching from daily to monthly partitioning with toYYYYMM, or removing a high-cardinality secondary partition dimension, addresses that multiplication directly. Monthly partitioning is the safer default for most time-series tables. The change is more involved than adjusting a setting, because it requires creating a new table and migrating data.
Merge pool tuning is appropriate when system.merges confirms saturation. Increasing background_pool_size and reviewing background_merges_mutations_concurrency_ratio can help when concurrent background work is the constraint. The diagnosis needs to come first here. On mutation-heavy workloads, deferring mutations or narrowing their scope also frees threads for ordinary part consolidation, addressing the competition within the pool.
When parts accumulate on lagging replicas, teams should check system.replication_queue depth and Keeper latency before touching merge thresholds. The repair belongs at the Keeper or network layer. This is not another version of pool tuning, even if the visible symptom is the same error. Following the location of the backlog helps keep the response tied to the mechanism that produced it.
Raising parts_to_throw_insert belongs last, as an emergency stopgap. It gives the background pool time to clear accumulated work without rejecting new inserts, but it does not remove any root cause. Its usefulness depends on the backlog actually shrinking. If incoming parts still outpace consolidation, the larger allowance will eventually fill as well. Teams should revert elevated thresholds once the backlog clears, rather than allow a larger backlog to accumulate on the next traffic spike.
A replication problem still calls for replication work, and a mutation-heavy pool calls for attention to mutations. The hierarchy is about choosing the right leverage.
How to confirm a backlog is clearing and what to watch afterward
A raised threshold can stop rejections while the underlying accumulation continues, so the evidence must come from background work and part counts. The backlog needs to be visibly shrinking. system.merges should show merge work draining faster than new parts arrive, while parts_to_do per table trends toward zero.
For ongoing health, teams should track system.parts, filtered to active parts, by table and partition. That breakdown shows where parts are piling up, which a wider view could hide. Background CPU use provides another useful warning. When merge activity consumes the majority of CPU time, it is a rule-of-thumb sign that consolidation pressure deserves attention before the throw threshold is reached again. Together, the part counts and the share of CPU spent merging show both the unfinished work and the effort required to keep up.
Why managed infrastructure and compute-storage separation change the merge picture
The available response changes when durable data lives in shared object storage such as S3, GCS, or Azure Blob, while stateless compute nodes use local SSDs only for caching. In that architecture, adding compute nodes can scale the merge pool horizontally without duplicating stored data. Storage and merge capacity are no longer coupled. This creates a different route to handling background work from relying only on the resources of a server that also holds durable data. It changes the capacity options, though not the need to understand how quickly the workload creates parts.
Compute-compute separation goes further by allowing multiple independent compute services to work against the same underlying storage. Teams can set aside capacity for merges or run heavy mutations separately, so they no longer compete with query traffic for threads in the same pool. That separation targets contention rather than part creation. It is particularly relevant to the distinction between a workload generating too much consolidation work and a workload unable to get enough shared threads to finish it.
Object storage has meaningfully higher baseline latency than local NVMe, so shared durable storage does not make every access pattern equally cheap. A hot local cache becomes structural for point lookups or workloads requiring single-digit millisecond response times. It is not merely an optional refinement.
A fully managed operator takes responsibility for merge pool tuning, Keeper health, and background worker sizing as part of the service. In BYOC deployments, the operator’s team takes the same on-call role within the customer’s own cloud account or hardware. The operational responsibility stays with the operator.


