# Logstash Cache when elasticsearch not reachable

**URL:** <https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181>\
**Category:** Logstash\
**Created:** [September 2, 2020, 7:27am UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181 "2020-09-02T07:27:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkhadka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkhadka/32/74848_2.png) [@kkhadka](https://discuss.elastic.co/u/kkhadka)\
**Post date:** [September 2, 2020, 7:27am UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181/1 "2020-09-02T07:27:28Z")

</div>

if the elasticsearch is not reachable and data is being sent to logstash, does that data be cache by logstash until the elasticsearch is reachable?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 2, 2020, 7:31am UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181/2 "2020-09-02T07:31:21Z")

</div>

[https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#\_retry\_policy](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#_retry_policy) explains the approach the plugin takes.

---

<div class="post-metadata">

**Author:** ![kkhadka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkhadka/32/74848_2.png) [@kkhadka](https://discuss.elastic.co/u/kkhadka)\
**Post date:** [September 2, 2020, 11:22am UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181/3 "2020-09-02T11:22:31Z")

</div>

Thank you for your reply @warkolm. Three questions I want to ask:

1. I haven't enabled `dead_letter_queue_enable` in **logstash.yml** , but when the elasticsearch starts again, the data while elasticsearch isn't reachable is back. what does this if not DLQ.
2. In case if I enable DLQ, Is there any limit on the number of events/requests that will be stored in DLQ? if yes then is it possible to configure or increase that?
3. do i need to change logstash.yml file in all nodes of cluster for enabling DLQ?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [September 2, 2020, 4:46pm UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181/4 "2020-09-02T16:46:35Z")

</div>

The size of the DLQ is [configurable](https://www.elastic.co/guide/en/logstash/current/dead-letter-queues.html#_file_rotation).

---

<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:** [September 30, 2020, 4:46pm UTC](https://discuss.elastic.co/t/logstash-cache-when-elasticsearch-not-reachable/247181/5 "2020-09-30T16:46:47Z")

</div>

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