# Takes a long time to index

**URL:** <https://discuss.elastic.co/t/takes-a-long-time-to-index/36633>\
**Category:** Kibana\
**Created:** [December 8, 2015, 12:52pm UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633 "2015-12-08T12:52:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yzord](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yzord/32/44824_2.png) [@Yzord](https://discuss.elastic.co/u/Yzord)\
**Post date:** [December 8, 2015, 12:52pm UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633/1 "2015-12-08T12:52:04Z")

</div>

We are using ELK for logging (of course) but when we don't use the server for several weeks and we start it up again in the browser it takes a very long time before it shows some info. We have it also that it doesn't show anything but a red bar on top that it failed.

Is there a way (crontab?) to do the indexing automatically? So when we start it up again it doesn't need to index it all again?

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [December 9, 2015, 4:08am UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633/2 "2015-12-09T04:08:47Z")

</div>

What version of Kibana and Elasticsearch are you running? Any errors either in Kibana or ES when you see the red bar error? Kibana doesn't index data, Elasticsearch does, so i'm not sure what you're referring to when asking about automated indexing.

---

<div class="post-metadata">

**Author:** ![Yzord](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yzord/32/44824_2.png) [@Yzord](https://discuss.elastic.co/u/Yzord)\
**Post date:** [December 9, 2015, 8:37am UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633/3 "2015-12-09T08:37:35Z")

</div>

I have changed the HEAP\_SIZE (which was 1g) to the half of the memory what the server has. All has been fixed now.

What i did on a Ubuntu 14.04

/etc/security/limits.conf:

> elasticsearch - nofile 65535  
> elasticsearch - memlock unlimited

/etc/default/elasticsearch (on CentOS/RH: /etc/sysconfig/elasticsearch ):

> ES\_HEAP\_SIZE=4g  
> MAX\_OPEN\_FILES=65535  
> MAX\_LOCKED\_MEMORY=unlimited

/etc/elasticsearch/elasticsearch.yml:

> bootstrap.mlockall: true

Rebooted the server and Elasticsearch started the command with -Xms4g -Xmx4g

And yes sorry, this had nothing to do with Kibana after all. But because i was pointing my browser to Kibana i thought it got stuck.

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [December 9, 2015, 2:37pm UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633/4 "2015-12-09T14:37:57Z")

</div>

Cool, thanks for the update!

---

<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:** [July 6, 2017, 2:07pm UTC](https://discuss.elastic.co/t/takes-a-long-time-to-index/36633/5 "2017-07-06T14:07:03Z")

</div>

Closed on July 6, 2017, 2:07pm UTC


