# How to set refresh\_interval globally in runing elastic search cluster

**URL:** <https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225>\
**Category:** Elasticsearch\
**Created:** [September 12, 2019, 10:08am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225 "2019-09-12T10:08:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 10:08am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/1 "2019-09-12T10:08:17Z")

</div>

Hi Team

Kindly help me to configure refresh\_interval settings globally in running elastic search cluster

Kindly go through the below command, Which I used to setup refresh\_interval

curl -X PUT -k -u elastic:xxxxxx "[https://localhost:9200/\_cluster/settings](https://localhost:9200/_cluster/settings)" -H 'Content-Type: application/json' -d '  
{  
"index": {  
"refresh\_interval": "30s"  
}  
}'

## Error

{"error":{"root\_cause":[{"type":"action\_request\_validation\_exception","reason":"Validation Failed: 1: no settings to update;"}],"type":"action\_request\_validation\_exception","reason":"Validation Failed: 1: no settings to update;"},"status":400}

Kindly help me. Thanks in advance

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [September 12, 2019, 10:16am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/2 "2019-09-12T10:16:17Z")

</div>

> [@arun.kumar92](#):
>
> refresh\_interval

Try remove '\_cluster' in url:

curl -X PUT -k -u elastic:xxxxxx "[https://localhost:9200/\_settings](https://localhost:9200/_settings)" -H 'Content-Type: application/json' -d '  
{  
"index": {  
"refresh\_interval": "30s"  
}  
}'

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 10:26am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/3 "2019-09-12T10:26:44Z")

</div>

Hi

Thank you very much, It's working.

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 11:33am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/4 "2019-09-12T11:33:51Z")

</div>

Hi

I have set refresh interval to 30s, after that i have plan to change the value to 20s  
But i got below error. Could you please help to solve this

curl -X PUT -k -u elastic:xxxxx "[https://localhost:9200/settings](https://localhost:9200/settings)" -H 'Content-Type: application/json' -d '  
{  
"index": {  
"refresh\_interval": "60s"  
}  
}'  
{"error":{"root\_cause":[{"type":"resource\_already\_exists\_exception","reason":"index [settings/avEUrBsTTPGhbNVo97Ghhw] already exists","index\_uuid":"avEUrBsTTPGhbNVo97Ghhw","index":"settings"}],"type":"resource\_already\_exists\_exception","reason":"index [settings/avEUrBsTTPGhbNVo97Ghhw] already exists","index\_uuid":"avEUrBsTTPGhbNVo97Ghhw","index":"settings"},"status":400}

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [September 12, 2019, 11:49am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/5 "2019-09-12T11:49:57Z")

</div>

Sorry, it's "\_settings" not "setting" in url. if omit underline prefix, it will be thought an index. And you actually indexed a document into index named setting.

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 12:35pm UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/6 "2019-09-12T12:35:29Z")

</div>

So below command will set refresh\_interval : 30s

curl -X PUT -k -u elastic:xxxxxxx " [https://locahost:9200/\_settings](https://locahost:9200/_settings)" -H 'Content-Type: application/json' -d '  
{  
"index": {  
"refresh\_interval": "30s"  
}  
}'

Was this command set refresh\_interval to 30s already using indexes?

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [September 12, 2019, 12:39pm UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/7 "2019-09-12T12:39:29Z")

</div>

yes.

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 12:44pm UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/8 "2019-09-12T12:44:27Z")

</div>

I mean , How to set refresh interval existing indices and also future indices?  
I have huge indices, So below may I know below command is usfull to set refresh\_interval already running indices?

curl -X PUT -k -u elastic:xxxxxxx " [https://locahost:9200/\_settings](https://locahost:9200/_settings)" -H 'Content-Type: application/json' -d '  
{  
"index": {  
"refresh\_interval": "30s"  
}  
}'

---

<div class="post-metadata">

**Author:** ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)\
**Post date:** [September 12, 2019, 1:00pm UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/9 "2019-09-12T13:00:30Z")

</div>

You can do that for all future indices with template:

curl -XPUT [https://locahost:9200/\_template/all\_indices](https://locahost:9200/_template/all_indices) -d '

```
{
  "template": "*",
  "settings": {
    "refresh_interval": "30s"
  }
}'
```

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 12, 2019, 1:33pm UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/10 "2019-09-12T13:33:28Z")

</div>

Okay Thank you

---

<div class="post-metadata">

**Author:** ![arun.kumar92](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@arun.kumar92](https://discuss.elastic.co/u/arun.kumar92)\
**Post date:** [September 13, 2019, 10:20am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/11 "2019-09-13T10:20:52Z")

</div>

Hi

One more help,

Is there any issue or impact, if we set this refresh interval on running cluster?

---

<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:** [October 11, 2019, 10:20am UTC](https://discuss.elastic.co/t/how-to-set-refresh-interval-globally-in-runing-elastic-search-cluster/199225/12 "2019-10-11T10:20:54Z")

</div>

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