# Index auto-closing at night?

**URL:** https://discuss.elastic.co/t/index-auto-closing-at-night/111929
**Category:** Elasticsearch
**Created:** [December 15, 2017, 9:00am UTC](https://discuss.elastic.co/t/index-auto-closing-at-night/111929 "2017-12-15T09:00:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ZaneCEO](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaneceo/32/25645_2.png) [@ZaneCEO](https://discuss.elastic.co/u/ZaneCEO)
#### Post date: [December 15, 2017, 9:00am UTC](https://discuss.elastic.co/t/index-auto-closing-at-night/111929/1 "2017-12-15T09:00:26Z")

</div>

Hi guys,  
I've a nasty problem where ES 1.7.3 index gets closed at night. I'm trying to understand why and what, but my limited experience with ES is slowing me down.

I've a single server shared by the web stack (Nginx+php) and ES. I'm working on a Magento 1.9.2.1 installation with [smile-magento-elasticsearch](https://github.com/Smile-SA/smile-magento-elasticsearch/) already installed and configured.

This is my index situation:

![img](https://s2.postimg.org/r9aqasz0p/belladonna.png)

ES port is firewalled against external traffic.

I didn't enable audit yet, so I don't have a REST calls log yet.

I've a script with two Magento procedures running at night. These usually write to MySQL, but are not writing to ES due to the smile-magento-elasticsearch module:

```
REINDEX_NIGHTLY START --> Fri Dec 15 04:00:01 CET 2017
shell/indexer.php -- -reindex catalogsearch_fulltext
Catalog Search Index index was rebuilt successfully in 01:15:32

shell/indexer.php -- -reindex catalog_product_attribute
Product Attributes index was rebuilt successfully in 00:07:39
REINDEX_NIGHTLY END --> Fri Dec 15 05:23:14 CET 2017

```

In my `/var/log/elasticsearch/project.log` I see:

```
[2017-12-15 05:35:00,525][DEBUG][action.admin.indices.settings.put] [Bella Donna] failed to update settings on indices [myproject-20171215-030002]
org.elasticsearch.ElasticsearchIllegalArgumentException: Can't update [index.number_of_replicas] on closed indices [[myproject-20171215-030002]] - can leave index in an unopenable state
	at org.elasticsearch.cluster.metadata.MetaDataUpdateSettingsService$2.execute(MetaDataUpdateSettingsService.java:237)
	at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:374)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:204)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:167)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

```

I'm checking both Magento's and Linux cron but I don't see anything running at `2017-12-15 05:35:00`.

I'm at a loss here, any help is appreciated, thanks.

---

<div class="post-metadata">

### Author: ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)
#### Post date: [December 16, 2017, 5:53pm UTC](https://discuss.elastic.co/t/index-auto-closing-at-night/111929/2 "2017-12-16T17:53:23Z")

</div>

Elasticsearch won't auto-close an index by itself. An index can only be closed by an external call to `POST <index_name>/_close`.

You can check Elasticsearch logs to know when the index was closed.

---

<div class="post-metadata">

### Author: ![ZaneCEO](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaneceo/32/25645_2.png) [@ZaneCEO](https://discuss.elastic.co/u/ZaneCEO)
#### Post date: [December 16, 2017, 6:11pm UTC](https://discuss.elastic.co/t/index-auto-closing-at-night/111929/3 "2017-12-16T18:11:08Z")

</div>

Thanks Thiago.

As I said, there is no reference to this "closing" in the standard /var/log/elastisearch. We enabled logging now: will check it on monday.

---

<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: [January 13, 2018, 6:11pm UTC](https://discuss.elastic.co/t/index-auto-closing-at-night/111929/4 "2018-01-13T18:11:17Z")

</div>

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