Why OpenSearch circuit breaker errors appear and when to act on them
When searches or writes fail with a circuit_breaking_exception under load, the cluster is working as designed: a circuit breaker is a protective limit that rejects a request before it can exhaust the JVM heap and take the node down. The fix depends on what is consuming heap, not on the breaker itself. Raising a limit only moves the failure point, so the first job is to identify which request or data structure is using the memory.
The breakers form a family. The parent breaker watches total memory use across the node and trips when the combined estimate crosses its threshold. Child breakers guard specific structures such as request data, field data and in-flight requests, and each has its own limit. The parent limit defaults to 95 percent of JVM heap when indices.breaker.total.use_real_memory is true and 70 percent when it is false, so the setting you run with changes how early requests are rejected. Confirm the value on your version in the OpenSearch circuit breaker docs before comparing error messages across clusters.
Teams need this diagnosis when rejections appear during peak search traffic, after a new dashboard or aggregation goes live, or when heap usage stays high between requests instead of dropping after garbage collection. This page covers the parent breaker, the child breakers, heap sizing, and the decision between raising a limit and fixing the query or the data model. Making that decision well depends on knowing the heap budget, the shard count per node and which teams send the expensive requests, so gather those facts before changing any setting.
Circuit breaker settings and when each one fits
This table compares the circuit breaker settings that govern when OpenSearch rejects a request to protect the JVM heap. Read each row for when the setting fits, what changing it risks, and what to check first. The main takeaway is that raising a limit rarely fixes an expensive query, so confirm the cause before touching any breaker.
| Setting | When it fits | Risk of changing it | Check before touching it |
|---|---|---|---|
| indices.breaker.total.use_real_memory | Keep at its default of true so the parent breaker tracks actual memory use, which is the basis for the 95 percent default limit. | Setting it to false switches the parent limit to the 70 percent default, which can reject requests earlier than expected on a healthy node. | Confirm the current value on every node and whether the team expects the parent breaker to trip at 95 or 70 percent of heap. |
| Parent breaker limit | Use when many child breakers together push the node toward heap exhaustion and a single cap is needed to protect the node. | Raising it leaves less headroom for garbage collection, so a node can slow or fail before the breaker trips. | Review heap usage trends, GC logs and which child breaker trips most often before changing the parent limit. |
| Request breaker | Relevant when aggregations, large bucket counts or big sort and scroll requests trip the breaker for a single request. | Raising the limit allows a single request to hold more heap, which can starve other queries on the same node. | Identify the query or aggregation responsible, check bucket sizes and confirm whether the request can be narrowed or paged. |
| Field data breaker | Relevant when fielddata loads on text fields or high-cardinality fields exhaust heap during sorting or aggregation. | A higher limit lets fielddata grow until heap pressure and long garbage collection pauses follow. | Check which fields are loaded into fielddata and whether they can use keyword or doc values instead. |
| Overhead settings | Used to adjust how much extra memory the breaker estimates each request or operation will need. | Overhead values that are too low let requests exceed real memory; values that are too high reject work that would have succeeded. | Compare breaker estimates with actual usage over time before changing any overhead value. |
| Heap size on each node | Adjust when sustained pressure reflects a heap that is too small for the data and workload on that node. | A larger heap can extend garbage collection pauses and reduce memory left for the operating system file cache. | Confirm the node has enough RAM, the heap is set according to current OpenSearch guidance and no other process competes for memory. |
Common causes of heap pressure that trip breakers
Circuit breaker trips are usually a symptom, not the problem itself. Most heap pressure comes from a small set of request patterns and cluster layouts that each leave a recognizable trail, so the first check should follow the symptom. Work through these causes in order of what your logs and cluster stats show most clearly.
Heavy aggregations on high-cardinality fields
Terms, cardinality and nested aggregations build large in-memory bucket structures on each data node that handles the request. Breaker errors often appear only on dashboards or scheduled reports that group by user, IP, or request ID. First check: the aggregation body of the slowest or failing requests, and whether the field has millions of distinct values. Confirm the field mapping before changing any limit.
Field data loaded on text fields
Sorting or aggregating on a text field forces OpenSearch to load field data for every term into heap, which is costly and rarely intended. The mapping usually came from a default dynamic template rather than a deliberate choice. First check: the mapping for the field and the fielddata usage reported per node. The usual fix is a keyword sub-field for aggregations, not a larger heap.
Large result sizes and deep pagination
A large size value or a deep from offset forces each shard to return and the coordinating node to merge far more hits than the client displays. Memory use grows with the page depth and with the number of shards queried. First check: the size and from values in recent requests, and whether clients page through results with offsets. Search-after or scroll-style patterns are the usual replacement, and the client code should be checked before the cluster.
Too many shards per node
Each shard carries segment metadata, caches and buffers that sit in heap whether or not it is being queried. A node holding thousands of small indexes can run out of room before any single query is heavy. First check: the shard count per node and the average shard size from the cluster allocation view. Consolidating indexes, adjusting rollover settings, or adding data nodes addresses the root cause.
Oversized bulk requests
A bulk request is held in memory on the coordinating node and on each data node while it is processed. Very large batches from a log shipper or an ingest job can trip the breaker during a traffic spike even when steady load is fine. First check: the bulk request size and concurrency in the client or shipper configuration, and whether trips coincide with backfills. Smaller, bounded batches with retry logic are the usual remedy.
Too little heap for the data volume
Heap is fixed at startup, and a node that holds more data, shards or concurrent requests than its heap was sized for will trip breakers under normal load. The symptom is a steady climb in heap use that never fully recovers after garbage collection. First check: heap sizing against the node's memory and role, and whether the host has memory left for the operating system file cache. Confirm current heap settings in your installation before raising them, since the defaults and sizing guidance depend on your version and deployment method.
When to raise limits and when to fix the query
When one query shape trips the breaker every time it runs, the cause is almost always the query or the mapping, not the limit. Heavy aggregations on high-cardinality text or keyword fields, sorting or aggregating on fields that were never meant for it, and wide wildcard or regex searches can each load large amounts of data onto the heap at once. Raising the limit lets the same query consume more memory before it fails, and it can push the node into long garbage collection pauses that look like a different problem.
- Find the query first: Check which request fails and what it contains before changing any setting, using the task and search logs or your application traces.
- Reduce the field set: Aggregate on
keywordor numeric fields where possible, and avoid fielddata ontextfields unless you have confirmed the need. - Narrow the time range: Add range filters so the query touches fewer segments and documents.
- Change the mapping when it is wrong: Fields used only for filtering or sorting should not be indexed as analyzed text with fielddata enabled.
- Confirm the fix: Rerun the same query after the change and watch heap usage on the affected node.
Closing check: confirm the failing query, its fields and its time range, then verify the change on the same query before touching any breaker setting.
When every query is ordinary but heap usage climbs steadily until breakers trip, the cluster has more data, shards or concurrent users than its memory can hold. Heap pressure grows with the number of shards per node, the size of cached structures such as fielddata and request caches, and the volume of indexing in flight. In this situation, the fix is capacity: more heap within safe limits, more nodes, or fewer shards and less retained data. A higher breaker limit only postpones the trip while the real shortage continues.
- Check heap trend over time: Look for a rising baseline across days, not a single spike, before deciding it is a capacity problem.
- Count shards per node: Too many small shards consume heap for metadata; consolidate indices or reduce replica counts where the availability design allows it.
- Review heap sizing: Confirm the JVM heap follows the OpenSearch sizing guidance for your host memory, and do not give the heap most of the machine's RAM, since the operating system needs memory for file caching.
- Add nodes or data nodes: Spread data and queries across more capacity when the current nodes cannot hold the working set.
- Expire old data: Apply retention so indices that nobody queries stop occupying heap.
Closing check: compare heap trend, shard count per node and data volume to the node capacity you planned, and ask what has changed since the cluster last ran well.
When breakers trip only during a scheduled job, such as a nightly re-index, a large export, a backfill, or a month-end report, the trigger is a known event rather than a permanent shortage. The right move depends on whether the job's shape can change. Often the job can be split into smaller batches, throttled, or moved to a window with less user traffic. Raising a limit to let the job finish can be a reasonable short-term decision, but only if the job is bounded and the change is reversed afterward.
- Measure the job: Record its request sizes, concurrency and the heap peak it causes, so the discussion starts from data.
- Split and throttle: Use smaller bulk requests and fewer parallel readers or writers so each step stays within memory limits.
- Schedule around users: Move heavy work away from peak search traffic when the business allows it.
- Treat any limit change as temporary: If a higher limit is needed, record the old value, set a review date, and reset it once the job is restructured.
- Document the trigger: Add the job to the runbook so the next operator knows the cause and the intended fix.
Closing check: ask whether the job can run in smaller pieces, and confirm the limit change, if any, has an owner and a reversal step.
When one or two nodes trip breakers while others sit with plenty of heap, the problem is usually shard placement. A few oversized shards, hot indices assigned to the same node, or allocation that ignores zone or node attributes can concentrate memory use on a single machine. Adding a global limit does not fix this, because the overloaded node still holds the same data and queries still fan out to it. The fix is to rebalance the data, correct the shard layout, and set allocation rules that spread load across nodes.
- Compare nodes: Check heap, shard count and disk usage per node to confirm the imbalance before changing anything.
- Review shard sizing: Split or reindex indices whose shards are far larger than the rest, and consolidate tiny shards that add overhead.
- Use allocation awareness: Configure shard allocation awareness so replicas and primaries spread across failure domains, as the cluster documentation recommends.
- Check for hot indices: Move write-heavy or query-heavy indices onto nodes with the capacity for them, or give them their own nodes.
- Verify the balance: After the change, confirm heap and shard counts converge across nodes before concluding the fix worked.
Closing check: confirm whether the breaker trips on one node or many, and verify shard distribution before deciding whether a limit change is even relevant.
How to diagnose a circuit breaker trip step by step
This sequence moves from the raw exception to a single, verified change, so you know which breaker tripped, what caused it, and whether the fix belongs in the query, the cluster sizing or the limit.
Capture the exception and breaker name
Start by collecting the full error from the client or application logs, including the HTTP status, the exception class and the breaker name in the message, such as the parent, request, fielddata or in_flight_requests breaker. Also note the timestamp and the node that reported it. Run
GET _cluster/state/nodesto confirm which nodes are in the cluster at that time. You are done when you can state the breaker name, the node and the time window in one sentence, so every later check looks at the same period.Check node heap and breaker stats
Run
GET _nodes/stats/breaker,jvm?prettyand compare each node's JVM heap used percentage and each breaker'slimit_size,estimated_sizeandtrippedcounters. A breaker that shows a hightrippedcount and an estimate near its limit points to the cause. Pay attention to the parent breaker, whose limit is 95 percent of heap whenindices.breaker.total.use_real_memoryis true and 70 percent when it is false, so confirm which mode your cluster uses before comparing numbers. You are done when you know whether heap was genuinely full or the estimate was the trigger.Identify the query or bulk request responsible
Find the request that pushed memory over the limit. Check your slow logs and any search or indexing logs that cover the time window from step one, and use the Tasks API (
GET _tasks?detailed=true&actions=*search*) to see in-flight work. Look for largesizevalues, deep pagination, wide wildcard queries, or bulk requests with very large payloads. You are done when you have a specific query body or bulk batch, or you have confirmed that no single request dominated and the load was spread across many clients.Inspect field data and aggregation usage
Run
GET _nodes/stats/indices/fielddata?fields=*andGET _cat/fielddata?vto see which fields hold field data on heap. Sorting or aggregating on text fields, or on high-cardinality keyword fields, is a common cause of fielddata breaker trips. Also review the aggregation in the suspect query for deep nesting, largetermsbucket counts, or unboundedcardinalityuse. You are done when you can name each field consuming fielddata and each aggregation that is large enough to explain the breaker estimate.Review shard counts and heap sizing
Run
GET _cat/shards?vandGET _cat/allocation?vto count shards per node and the disk and shard distribution across data nodes. Compare the shard count with the heap available on each node, since many small shards consume heap for segment and metadata overhead. Confirm the heap setting injvm.optionsor your container environment, and check that heap is set to a fixed size and does not exceed the guidance in the cluster tuning docs. You are done when you can say whether the node is short on heap, carrying too many shards, or both.Change one thing at a time
Choose the single most likely cause from the evidence and make one change: rewrite the query, adjust an aggregation, add or resize heap, reduce shards, or raise a breaker limit. Record the current values first (for example with
GET _cluster/settings?include_defaults=true&filter_path=**.breaker*) so you can revert. Changing several settings at once makes it impossible to tell which one helped. You are done when the change is recorded in your change log with its before and after values.Verify the change under the same load
Repeat the request that tripped the breaker and rerun
GET _nodes/stats/breaker,jvm?prettyduring comparable traffic. Confirm that thetrippedcounter stops increasing, that estimated size stays well below the limit, and that heap usage recovers after garbage collection. If the breaker still trips, return to the evidence and pick the next cause rather than raising limits further. You are done when the same workload runs without new trips and the before and after figures are documented.
How a request moves through the breakers to a rejection
The request enters at a coordinating node, which fans the work out to shards on data nodes. Each shard-level operation reserves memory against child breakers for requests and field data, and every reservation is also checked against the parent breaker, which compares total tracked memory with the heap limit. If the check passes, the response returns normally; if it fails, the node rejects the operation with a circuit_breaking_exception. When you see that error, check which breaker tripped and what the request was doing, since the parent breaker reports total pressure rather than a single culprit.
Decision points where a request either completes or is rejected by a breaker.
Sizing JVM heap so breakers protect the node without starving it
The heap size decision determines how much room the circuit breakers have to work with. The parent breaker trips at 95 percent of heap when indices.breaker.total.use_real_memory is true and at 70 percent when it is false, so a heap that is too small trips early under normal load, while a heap that is too large makes the node wait longer before any protection engages. Sizing is a balance between those two failure modes, not a question of giving the JVM as much memory as the host allows.
A larger heap gives queries, aggregations and indexing buffers more room, but garbage collection has to scan and reclaim more memory, which can lengthen pauses that stall requests and push nodes out of cluster communication. The operating system also needs memory for the file system cache, which is where Lucene segment data is read from quickly. Giving the heap most of the host's RAM starves that cache and shifts pressure onto disk reads, so the breakers may stay quiet while latency climbs. Plan the heap as one part of the host's memory budget, with the cache and other processes accounted for.
Keep the heap inside the range the OpenSearch documentation recommends for your release, and do not raise it simply to clear a breaker error. Confirm the current heap guidance, the maximum heap value and the bundled JVM version in the installation and configuration docs for the exact version you run, because these recommendations change between releases and the bundled JVM can differ from one version to the next. Check the jvm.options file on each node so every node has the same heap settings, and check that the minimum and maximum heap values match.
Before changing heap size, capture breaker trip counts, garbage collection logs and node memory usage during the failure window. If heap usage stays high after the load has passed, the cause is usually field data, large aggregations or oversized request batches, and those are fixed in the queries or mappings rather than the heap. If the breakers trip only during known peaks and the host has spare memory that remains within the documented range, a planned heap change with a rolling restart may be the correct fix. Ask your platform team or partner to record the before and after figures so the change can be reviewed.
Operational and security considerations when tuning memory limits
Raising a circuit breaker limit changes how much memory the cluster will commit before it refuses work, so the change itself is a production decision. The cards below cover the change process, who can alter cluster settings, how breaker trips are monitored, how query access is scoped, and what logs reveal.
Record and roll back every breaker change
Breaker limits are cluster settings, and a change applied to a live cluster can shift memory pressure onto every node at once. Before editing a limit, record the current value, the reason, the target value and the owner, and write down how to restore the previous value. Confirm the rollback command with a test in a non-production cluster first, and check that the setting is applied as a transient or persistent change exactly as your change process expects.
Circuit breaker docsRestrict who can change cluster settings
Changing breaker limits requires cluster-level privileges, and those privileges should sit with a small set of administrators rather than with application teams or dashboard users. Map the cluster settings permission to a named admin role through the Security plugin, keep the admin certificate and any API keys under the same control, and review membership of that role on a regular schedule. Ask who can reach the cluster API from which networks.
Alert on breaker trips and heap pressure
A breaker trip is the cluster refusing a request to protect itself, and repeated trips usually mean that a workload is pressing against memory limits before users notice failures. Set alerts on breaker trip counts and on sustained JVM heap usage per node, and route them to the team that owns the cluster. Confirm which metrics your monitoring stack can collect from the node stats API, and tie each alert to a runbook that says whether to fix a query or change a limit.
Scope query access by tenant and application
Heavy aggregations are often run by a specific application, dashboard or tenant, so memory cost should be traceable to a role. Define roles per application or team with index patterns that match only the data they need, and limit which users can run wide aggregations on high-cardinality fields. Document which service accounts query the cluster, so that a breaker trip can be matched to a caller and the fix goes to the right owner.
Control what logs reveal
Slow query and error logs can record the full query body, field names and sometimes values, which may contain personal or regulated data. Decide which log levels and slow log thresholds are enabled in production, restrict who can read cluster logs and dashboards that display query content, and check whether audit logging is enabled for admin actions such as setting changes. Confirm retention periods for these logs with your compliance owner before you enable verbose diagnostics.
Questions teams ask before fixing circuit breaker errors
Is raising the circuit breaker limit a safe fix for OpenSearch errors?
Raising the limit is sometimes appropriate, but it rarely fixes the cause. A circuit breaker exists to stop a single request from loading more data into the JVM heap than the node can hold. The parent breaker limit defaults to 95 percent of heap when indices.breaker.total.use_real_memory is true and 70 percent when it is false, as described in the OpenSearch circuit breaker docs. Raising it moves the failure point rather than removing the pressure. Before changing it, confirm which breaker tripped, what request caused it, and whether the node has heap headroom left after the change. Treat a higher limit as a temporary measure with a monitoring plan, not a closing step.
How long does diagnosing circuit breaker errors usually take?
The duration depends on how much evidence the cluster already keeps and how many workloads share it. Diagnosis is faster when heap usage history, breaker trip messages, and the request logs are retained and easy to query. It takes longer when heap growth is gradual, when several teams send heavy aggregations to the same cluster, or when no one can tell which index or dashboard started the pressure. Ask any provider to state the evidence they need before work starts, which usually includes node statistics, the cluster settings in use, index mappings, and a sample of the failing queries. Because the work depends on your data and traffic, the duration should come from a written scope, not a general figure.
What does the internal team need to provide for this work?
The work needs access to the cluster and a person who understands the workloads. In practice, teams usually provide:
- Administrative API access to read node stats, cluster settings and index metadata
- Access to application logs or dashboard definitions that send the heavy queries
- A named owner for each index or data stream and the teams that query it
- Permission to test changes in a non-production copy or during an agreed window
Without a workload owner, fixes to queries and mappings are hard to verify. Plan for someone who can approve query changes, since those affect applications and dashboards outside the platform team.
Can our own team diagnose and fix circuit breaker errors?
Yes, many teams can, provided they have someone comfortable with JVM memory, the cluster APIs and query design. The core skills are reading breaker trip messages, correlating them with heap usage, identifying expensive aggregations and field data use, and reviewing mappings. The harder part is usually organizational: changing a dashboard or query owned by another team. A partner is most useful when the team lacks JVM or search tuning experience, when the cluster is business critical and changes must be reviewed, or when the same problem keeps returning. Decide early which parts you will keep in-house and which you want reviewed.
What drives the cost of a consultant quote for this work?
A quote follows from the written scope. DeployOpen does not publish a price list. The main cost components are the diagnosis effort (how many nodes, indices and workloads are involved), the number of query and mapping changes to review, any heap or node sizing work, and the verification effort to confirm the cluster stays stable under normal load. Ask the provider to split the quote into a fixed diagnosis phase, a fix phase and an optional follow-up such as monitoring setup or a retainer. Ask what is one-time and what recurs, and whether retesting after the fix is included.
How does heap sizing change as our data grows?
Heap needs grow with the number of shards, the size of field data and the amount of memory used to hold aggregations and caches, not only with the size of the stored data. More shards per node and larger mappings increase baseline heap use, so a cluster that worked at one volume can trip breakers after growth even when queries have not changed. Review heap usage trends after each growth step, check shard counts per node, and confirm that the node has enough memory for the heap and the operating system file cache. The right heap size should be tested against your own workload rather than copied from another cluster.
Do repeated breaker errors mean the cluster needs a redesign?
Not always. Repeated errors often point to a small set of queries, mappings or index layouts that can be corrected without a redesign. They suggest a redesign when the cluster has too many shards for its node count, when one cluster serves workloads with very different needs such as logs and user-facing search, or when growth has outpaced the planned node roles. Check whether the dedicated cluster manager, data and ingest roles still match the workload, and whether shard allocation and replica placement reflect your availability needs. If those basics are sound and the errors track specific queries, tuning is usually the right step.
Official circuit breaker documentation
The official OpenSearch circuit breaker documentation is the single reference for breaker setting names, default values and how each limit behaves, so read it before changing any breaker value on your cluster. Setting names and defaults can differ between OpenSearch versions, and a value copied from a forum post or an older blog may not match the release you run. Start by confirming the version of every node, then read the settings page for that version and note the exact keys you plan to inspect or change.
The parent breaker is the setting most teams hit first. The documentation states that its limit defaults to 95 percent of JVM heap when indices.breaker.total.use_real_memory is true and to 70 percent when it is false. Confirm which mode your cluster uses before you interpret a trip, because the same heap usage can sit below one threshold and above the other. The page is the place to verify that default for your release, and to check whether any of the child breakers, such as the request or field data breakers, have their own limits that you should review alongside it.
Use the documentation as the reference for what you may change, not as a reason to change it. Before you edit a breaker limit in a live cluster, record the current value with the cluster settings API, note the version-specific default, and decide whether the trip reflects a query or mapping problem that a limit increase would only hide. The OpenSearch circuit breaker settings page is the next read for exact names and defaults, and it should sit next to your own cluster's settings output during the review.
How DeployOpen diagnoses and tunes OpenSearch memory limits
DeployOpen scopes circuit breaker and JVM memory work as a fixed-scope engagement, starting from the cluster's actual query, aggregation and indexing load rather than from a default setting. The work covers diagnosis, heap and breaker configuration, query remediation and a handover that your own team can run.
How we scope
- Written scope names the clusters, versions, node roles and heap sizes covered by the engagement
- Scope lists the breaker exceptions, failing queries and dashboards you want investigated and explained
- Deliverables, timelines and access needs are agreed in writing before any change is made to production
How we build
- We pull breaker trip history, heap usage and the slowest aggregations per node to find the load driving each trip
- We test proposed query, mapping and breaker changes in a copy of your cluster before touching production
- Each change is recorded with its reason, the setting before and after, and the test evidence behind it
How we hand over
- You receive a runbook covering breaker settings, heap sizing rules and the checks to run after a trip
- Your team gets a walkthrough of the diagnostic steps used, so future breaker exceptions can be triaged in-house
- Documentation records which limits were raised, which queries were fixed and why each decision was made
How we support
- Ongoing support, version upgrades and continuous testing are available as a retainer after handover
- Retainer support can cover re-checking heap and breaker behavior after OpenSearch version upgrades
- Confirm with DeployOpen during scoping which support hours, response channels and review cadence apply

