Skip to content

Commit 375d7bb

Browse files
authored
[DOCS] Add timeout warning to ESQL completion command (elastic#131994)
1 parent 8d3634a commit 375d7bb

File tree

1 file changed

+31
-1
lines changed
  • docs/reference/query-languages/esql/_snippets/commands/layout

1 file changed

+31
-1
lines changed

docs/reference/query-languages/esql/_snippets/commands/layout/completion.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,39 @@ including:
4646
**Requirements**
4747

4848
To use this command, you must deploy your LLM model in Elasticsearch as
49-
an [inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the
49+
an [inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the
5050
task type `completion`.
5151

52+
#### Handling timeouts
53+
54+
`COMPLETION` commands may time out when processing large datasets or complex prompts. The default timeout is 10 minutes, but you can increase this limit if necessary.
55+
56+
How you increase the timeout depends on your deployment type:
57+
58+
::::{tab-set}
59+
:::{tab-item} {{ech}}
60+
* You can adjust {{es}} settings in the [Elastic Cloud Console](docs-content://deploy-manage/deploy/elastic-cloud/edit-stack-settings.md)
61+
* You can also adjust the `search.default_search_timeout` cluster setting using [Kibana's Advanced settings](kibana://reference/advanced-settings.md#kibana-search-settings)
62+
:::
63+
64+
:::{tab-item} Self-managed
65+
* You can configure at the cluster level by setting `search.default_search_timeout` in `elasticsearch.yml` or updating via [Cluster Settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings)
66+
* You can also adjust the `search:timeout` setting using [Kibana's Advanced settings](kibana://reference/advanced-settings.md#kibana-search-settings)
67+
* Alternatively, you can add timeout parameters to individual queries
68+
:::
69+
70+
:::{tab-item} {{serverless-full}}
71+
* Requires a manual override from Elastic Support because you cannot modify timeout settings directly
72+
:::
73+
::::
74+
75+
If you don't want to increase the timeout limit, try the following:
76+
77+
* Reduce data volume with `LIMIT` or more selective filters before the `COMPLETION` command
78+
* Split complex operations into multiple simpler queries
79+
* Configure your HTTP client's response timeout (Refer to [HTTP client configuration](/reference/elasticsearch/configuration-reference/networking-settings.md#_http_client_configuration))
80+
81+
5282
**Examples**
5383

5484
Use the default column name (results stored in `completion` column):

0 commit comments

Comments
 (0)