You might get this problem with fielddata size limit. fielddata size limit is checked after the query data is loaded. When your elasticsearch query tried to load data more than the fielddata available memory then you would get the OutOfMemoryException.

Caused by: org.elasticsearch.common.breaker.CircuitBreakingException: Data too large, data for field [parent/child id cache] would be larger than limit of [6620471234/6.3gb]
at org.elasticsearch.common.breaker.MemoryCircuitBreaker.circuitBreak(MemoryCircuitBreaker.java:82) at org.elasticsearch.common.breaker.MemoryCircuitBreaker.addEstimateBytesAndMaybeBreak(MemoryCircuitBreaker.java:132)
at org.elasticsearch.index.fielddata.RamAccountingTermsEnum.flush(RamAccountingTermsEnum.java:70)
at org.elasticsearch.index.fielddata.RamAccountingTermsEnum.next(RamAccountingTermsEnum.java:84)
at org.elasticsearch.index.fielddata.plain.ParentChildIndexFieldData.loadDirect(ParentChildIndexFieldData.java:112)
at org.elasticsearch.index.fielddata.plain.ParentChildIndexFieldData.loadDirect(ParentChildIndexFieldData.java:59)

How to resolve CircuitBreaking Exception??

First try with clear cache for that particular index where you are getting the CircuitBreakingException

$ curl -XPOST 'http://localhost:9200/<Index Name Here>/_cache/clear'

If you are still getting CircuitBreaking Exception then here are the two ways to resolve CircuitBreakingException

1) Adding more node or
2) Increase the amount of heap space (and total RAM) but you should choose it very

If you increase RAM then you can increase the heap size. It’s advisable to assign heap size not more than 50% of available RAM. So now you might have the question how increase heap size will help you to increase the fielddata size limit. So the answer is “The fielddata circuit breaker limits the size of field data to 60% of the heap, by default”.

If you don’t have option and you still want to change default fielddata size limit more than 60%, then here are two ways to do this. 

A) Set fielddata size in elasticsearch.yml but it will require cluster restart.

indices.breaker.fielddata.limit : 70%

B) Increase fielddata limit from live cluster settings. It will not require cluster restart.

curl -XPUT 'http://localhost:9200/_cluster/settings' -d '
{
    "persistent" : {
       "indices.breaker.fielddata.limit" : "70%"
    }
}'
Circuit Breakers SettingsDefault size (% of heap size)The fielddata circuit breaker limits the size of fielddata
indices.breaker.fielddata.limit60%The fielddata circuit breaker limits the size of fielddata
indices.breaker.request.limit40%The request circuit breaker estimates the size of structures required to complete other parts of a request, such as creating aggregation buckets
indices.breaker.total.limit70%The total circuit breaker wraps the request and fielddata circuit breakers to ensure that the combination of the two

Source: 

https://www.elastic.co/guide/en/elasticsearch/guide/current/_limiting_memory_usage.html

 

(Visited 1,024 times, 42 visits today)