Skip to content

Commit b611fe4

Browse files
committed
More opinionated docs about http.max_content_length (#90500)
Adds to the docs a note that the `100mb` default for `http.max_content_length` is the recommended maximum, along with suggestions for what to do when hitting this limit.
1 parent 6afb2b0 commit b611fe4

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

docs/reference/docs/bulk.asciidoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,15 @@ Client libraries using this protocol should try and strive to do
109109
something similar on the client side, and reduce buffering as much as
110110
possible.
111111

112-
There is no "correct" number of actions to perform in a single bulk request.
113-
Experiment with different settings to find the optimal size for your particular workload.
114-
115-
When using the HTTP API, make sure that the client does not send HTTP chunks,
116-
as this will slow things down.
112+
There is no "correct" number of actions to perform in a single bulk request.
113+
Experiment with different settings to find the optimal size for your particular
114+
workload. Note that {es} limits the maximum size of a HTTP request to `100mb`
115+
by default so clients must ensure that no request exceeds this size. It is not
116+
possible to index a single document which exceeds the size limit, so you must
117+
pre-process any such documents into smaller pieces before sending them to {es}.
118+
For instance, split documents into pages or chapters before indexing them, or
119+
store raw binary data in a system outside {es} and replacing the raw data with
120+
a link to the external system in the documents that you send to {es}.
117121

118122
[discrete]
119123
[[bulk-clients]]

docs/reference/modules/http.asciidoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ Configure this setting only if you need the publish port to be different from
4343

4444
`http.max_content_length`::
4545
(<<static-cluster-setting,Static>>)
46-
Maximum size of an HTTP request body. Defaults to `100mb`.
46+
Maximum size of an HTTP request body. Defaults to `100mb`. Configuring this
47+
setting to greater than `100mb` can cause cluster instability and is not
48+
recommended. If you hit this limit when sending a request to the <<docs-bulk>>
49+
API, configure your client to send fewer documents in each bulk request. If you
50+
wish to index individual documents that exceed `100mb`, pre-process them into
51+
smaller documents before sending them to {es}. For instance, store the raw data
52+
in a system outside {es} and include a link to the raw data in the documents
53+
that {es} indexes.
4754

4855
`http.max_initial_line_length`::
4956
(<<static-cluster-setting,Static>>)

0 commit comments

Comments
 (0)