Skip to content

Commit e7346d3

Browse files
Added DNS cache settings to JVM settings doc (#135696)
* Added DNS cache settings to JVM settings doc * Update docs/reference/elasticsearch/jvm-settings.md Co-authored-by: shainaraskas <[email protected]> --------- Co-authored-by: shainaraskas <[email protected]>
1 parent 0755992 commit e7346d3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/reference/elasticsearch/jvm-settings.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,16 @@ docker run -e ES_JAVA_OPTS="$MY_OPTS" # etc
200200
By default, {{es}} configures the JVM to write fatal error logs to the default logging directory. On [RPM](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) and [Debian](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) packages, this directory is `/var/log/elasticsearch`. On [Linux and MacOS](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-from-archive-on-linux-macos.md) and [Windows](docs-content://deploy-manage/deploy/self-managed/install-elasticsearch-with-zip-on-windows.md) distributions, the `logs` directory is located under the root of the {{es}} installation.
201201

202202
These are logs produced by the JVM when it encounters a fatal error, such as a segmentation fault. If this path is not suitable for receiving logs, modify the `-XX:ErrorFile=...` entry in [`jvm.options`](#set-jvm-options).
203+
204+
## DNS cache settings [networkaddress-cache-ttl]
205+
206+
{{es}} runs with a security manager in place. With a security manager in place, the JVM defaults to caching positive hostname resolutions indefinitely and defaults to caching negative hostname resolutions for ten seconds.
207+
208+
{{es}} overrides this behavior with default values to cache positive lookups for sixty seconds, and to cache negative lookups for ten seconds. These values should be suitable for most environments, including environments where DNS resolutions vary with time.
209+
210+
If these default values are not suitable, you can edit them:
211+
* Cache positive lookups: `es.networkaddress.cache.ttl`
212+
* Cache negative lookups: `es.networkaddress.cache.negative.ttl`
213+
214+
The values [`networkaddress.cache.ttl=<timeout>`](https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.md) and [`networkaddress.cache.negative.ttl=<timeout>`](https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.md) in the [Java security policy](https://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.md) are ignored by {{es}} unless you remove the settings for `es.networkaddress.cache.ttl` and `es.networkaddress.cache.negative.ttl`.
215+

0 commit comments

Comments
 (0)