Search code examples
elasticsearchamazon-elasticsearch

Circuit breaker exception elasticsearch


{
  'error': {
    'type': 'circuit_breaking_exception',
    'reason': '[parent] Data too large, data for [<http_request>] would be [123848638/118.1mb], which is larger than the limit of [123273216/117.5mb], real usage: [120182112/114.6mb], new bytes reserved: [3666526/3.4mb]',
    'bytes_wanted': 123848638,
    'bytes_limit': 123273216,
    'durability': 'TRANSIENT'
  },
  'status': 429
}

I am trying to understand the above circuit breaker error.

  • [123273216/117.5mb] - parent circuit breaker limit (95%).
  • new bytes reserved [3666526/3.4mb] - this means the new request memory needs
  • [123848638/118.1mb] - current heap + new bytes reserved
  • real usage: [120182112/114.6mb] - current heap status

Is my understanding correct?


Solution

  • Yes, that's correct, basically:

    1. the current heap usage is 120,182,112
    2. the new bytes needed to carry out the request is 3,666,526
    3. the bytes wanted from memory would thus be 1 + 2 = 123,848,638
    4. the total heap is 129,761,280
    5. the maximum reservable heap memory for the parent circuit breaker is 95% of total heap = 123,273,216

    Since 3 (bytes wanted) > 5 (circuit breaker limit), the circuit breaker trips