# Clear any inflight events in memory before starting Logstash after restart

**URL:** <https://discuss.elastic.co/t/clear-any-inflight-events-in-memory-before-starting-logstash-after-restart/224135>\
**Category:** Logstash\
**Created:** [March 18, 2020, 3:30pm UTC](https://discuss.elastic.co/t/clear-any-inflight-events-in-memory-before-starting-logstash-after-restart/224135 "2020-03-18T15:30:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmoham](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@nmoham](https://discuss.elastic.co/u/nmoham)\
**Post date:** [March 18, 2020, 3:30pm UTC](https://discuss.elastic.co/t/clear-any-inflight-events-in-memory-before-starting-logstash-after-restart/224135/1 "2020-03-18T15:30:43Z")

</div>

We're sending logs using filebeats to Logstash (Parsing with configs) --\> LumberJack --\> ES. In some situations while collecting newer data types, we want to re-index data,  
so we do the following -

1. stop filebeats
2. stop logstash
3. Change any logstash filters
4. Delete Filebeat registry to re-read data
5. start Logstash
6. Start Filebeat

But during the step 5, when logstash is started, I think it tries to resend any inflight events it maybe holding up in the memory and creates the indexes with stale data in ES, but I want to prevent that from happening in this situation. I haven't been able to figure out any settings related that would help me preventing transmission of these events, as I want to re-index data.

Any suggestions or directions will be really helpful.

Thank you

---

<div class="post-metadata">

**Author:** ![Saravana37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saravana37/32/85237_2.png) [@Saravana37](https://discuss.elastic.co/u/Saravana37)\
**Post date:** [April 10, 2020, 2:28pm UTC](https://discuss.elastic.co/t/clear-any-inflight-events-in-memory-before-starting-logstash-after-restart/224135/2 "2020-04-10T14:28:53Z")

</div>

Following

---

<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:** [May 8, 2020, 2:29pm UTC](https://discuss.elastic.co/t/clear-any-inflight-events-in-memory-before-starting-logstash-after-restart/224135/3 "2020-05-08T14:29:44Z")

</div>

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