At the moment, we have two search related timeout configurations:
elasticsearch.shardTimeout - Used to indicate the shard timeout (i.e. how long it can run on a single shard). It is taken from kibana.yml setting, which is 30s by default.
elasticsearch.requestTimeout - Used by the Elastic Search client, to put a maximum time limit on each Elasticsearch request (it might be running requests on multiple shards). It is 30s by default.
Moving forward with the Background Sessions and Async Search initiatives, I would like to propose the following changes:
Introduce search.searchTimeout and remove elasticsearch.requestTimeout in async search
The elasticsearch.requestTimeout option is currently being used to limit the amount of time a series of async_search requests is allowed to run.
This use is incorrect and limiting, and hence we want to separate the timeout controlling this behavior into a separate setting: search.searchTimeout. This setting will default to a higher value (2\5 minutes TBD @giladgal) in 7.10, with the goal of making it unlimited by default in 7.11 (hence allowing a user running longer queries, as long as they stay on screen).
Doing so, will leave elasticsearch.requestTimeout to be a configuration used only by ESClient.
Use elasticsearch.shardTimeout on the server
Since the user can't (and doesn't need to) override the value of shardTimeout, we can use it on the server only. It should be sent with every search request. It can be used on the server side only, and removed from the client.
At the moment, we have two search related timeout configurations:
elasticsearch.shardTimeout- Used to indicate the shard timeout (i.e. how long it can run on a single shard). It is taken fromkibana.ymlsetting, which is30sby default.elasticsearch.requestTimeout- Used by the Elastic Search client, to put a maximum time limit on eachElasticsearchrequest (it might be running requests on multiple shards). It is30sby default.Moving forward with the Background Sessions and Async Search initiatives, I would like to propose the following changes:
Introduce
search.searchTimeoutand removeelasticsearch.requestTimeoutin async searchThe
elasticsearch.requestTimeoutoption is currently being used to limit the amount of time a series ofasync_searchrequests is allowed to run.This use is incorrect and limiting, and hence we want to separate the timeout controlling this behavior into a separate setting:
search.searchTimeout. This setting will default to a higher value (2\5 minutes TBD @giladgal) in 7.10, with the goal of making it unlimited by default in 7.11 (hence allowing a user running longer queries, as long as they stay on screen).Doing so, will leave
elasticsearch.requestTimeoutto be a configuration used only byESClient.Use
elasticsearch.shardTimeouton the serverSince the user can't (and doesn't need to) override the value of
shardTimeout, we can use it on the server only. It should be sent with everysearchrequest. It can be used on the server side only, and removed from the client.