From 04929ec6df0c1c153143659b09fcc189b97c0606 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 30 May 2023 15:35:16 -0400 Subject: [PATCH] Document how to configure XContent parsing constraints (#4154) * Document how to configure XContent parsing constraints Signed-off-by: Andriy Redko * Update _install-and-configure/install-opensearch/index.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Andriy Redko * Update _install-and-configure/install-opensearch/index.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Andriy Redko * Update _install-and-configure/install-opensearch/index.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Andriy Redko * Apply suggestions from code review Co-authored-by: Nathan Bower Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Andriy Redko Signed-off-by: Andriy Redko Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower --- _install-and-configure/install-opensearch/index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_install-and-configure/install-opensearch/index.md b/_install-and-configure/install-opensearch/index.md index 169683a6..08a59780 100644 --- a/_install-and-configure/install-opensearch/index.md +++ b/_install-and-configure/install-opensearch/index.md @@ -90,3 +90,11 @@ The [sample docker-compose.yml]({{site.url}}{{site.baseurl}}/install-and-configu Do not declare the same JVM options in multiple locations because it can result in unexpected behavior or a failure of the OpenSearch service to start. If you declare JVM options using an environment variable, such as `OPENSEARCH_JAVA_OPTS=-Xms3g -Xmx3g`, then you should comment out any references to that JVM option in `config/jvm.options`. Conversely, if you define JVM options in `config/jvm.options`, then you should not define those JVM options using environment variables. {: .note} +## Important system properties + +OpenSearch has a number of system properties that you can specify in `config/jvm.options` or `OPENSEARCH_JAVA_OPTS` using `-D` command line argument notation, for example: + +- `opensearch.xcontent.string.length.max=` + +By default, OpenSearch does not impose any limits on the maximum length of the JSON string fields. To protect your cluster from potential distributed denial-of-service (DDoS) or memory issues, you can set the `opensearch.xcontent.string.length.max` system property to a reasonable limit (the maximum is 2,147,483,647), for example, `-Dopensearch.xcontent.string.length.max=5000000`. +