# Correct way to set JVM DNS cache

**URL:** <https://discuss.elastic.co/t/correct-way-to-set-jvm-dns-cache/165495>\
**Category:** Elasticsearch\
**Created:** [January 23, 2019, 10:43pm UTC](https://discuss.elastic.co/t/correct-way-to-set-jvm-dns-cache/165495 "2019-01-23T22:43:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djtecha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djtecha/32/54011_2.png) [@djtecha](https://discuss.elastic.co/u/djtecha)\
**Post date:** [January 23, 2019, 10:43pm UTC](https://discuss.elastic.co/t/correct-way-to-set-jvm-dns-cache/165495/1 "2019-01-23T22:43:30Z")

</div>

Hello I'm trying to change the TTL as I believe it has something to do with creating issues on a remote cluster. (It just stops working after a few days). And I was wondering if this is the correct way to set the DNS TLL by editing the jvm.options file and dropping this argument:

```auto
## JVM DNS Caching
-Des.networkaddress.cache.ttl=600

```

---

<div class="post-metadata">

**Author:** ![djtecha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djtecha/32/54011_2.png) [@djtecha](https://discuss.elastic.co/u/djtecha)\
**Post date:** [January 23, 2019, 10:44pm UTC](https://discuss.elastic.co/t/correct-way-to-set-jvm-dns-cache/165495/2 "2019-01-23T22:44:28Z")

</div>

THE JVM will start up with any argument there so I don't really know how to see if it's working either. (it'll include the arg on the process tree regardless)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 20, 2019, 10:44pm UTC](https://discuss.elastic.co/t/correct-way-to-set-jvm-dns-cache/165495/3 "2019-02-20T22:44:31Z")

</div>

Closed on February 20, 2019, 10:44pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
