How to kill search query stream in elasticsearch cluster? Is there any API for this?

I created an elasticsearch cluster with big data, and the client can send it a search request. Sometimes a cluster spends a lot of time processing a single request. My question is, is there any API for killing a specified thread that costs too much time?

+6
source share
2 answers

I wanted to continue this answer when elasticsearch 1.0.0 was released. I am pleased to report that a new functionality has been introduced that implements some protection for the heap called a circuit breaker.

In the current implementation, the circuit breaker tries to predict how much data will be loaded into the field data cache, and if it is more than the limit (80% by default), it will turn off the circuit breaker and kill your request there.

There are two options to install if you want to change them:

indices.fielddata.breaker.limit indices.fielddata.breaker.overhead 

Overhead is a constant that is used to estimate how much data will be loaded into the field cache; the default is 1.03.

This is an exciting development for elasticsearch and a feature that I expected to implement in a few months.

This is a pull request if he is interested in how it was created; thanks dakrone for this!

https://github.com/elasticsearch/elasticsearch/pull/4261

Hope this helps, MatthewJ

+2
source

It is currently not possible to kill or stop lengthy requests, but Elasticsearch is going to add task api control for this. The API is likely to be added in Elasticsearch 5.0, possibly in 2016 or later.

see Task Management 1 and Task Management 2 .

+2
source

All Articles