elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.42k stars 24.57k forks source link

Add circuit breaker to prevent OOM searching very large docs #89656

Open dimitris-athanasiou opened 2 years ago

dimitris-athanasiou commented 2 years ago

Description

Presume an index contains docs with a single text field. The values of that field can be arbitrarily huge docs. There can easily come a point where doing a simple search against that index and requesting an appropriate size of docs in a single response can OOM the node.

Could there be a circuit breaker that prevents the node from OOM?

Steps to reproduce:

Observed: Node will turn unhealthy and restart due to OOM.

dimitris-athanasiou commented 2 years ago

cc @romseygeek

elasticsearchmachine commented 2 years ago

Pinging @elastic/es-core-infra (Team:Core/Infra)

elasticsearchmachine commented 2 years ago

Pinging @elastic/es-search (Team:Search)

elasticsearchmachine commented 1 month ago

Pinging @elastic/es-search-foundations (Team:Search Foundations)