# Filebeat not deleting disk queue segment files

**URL:** <https://discuss.elastic.co/t/filebeat-not-deleting-disk-queue-segment-files/349094>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 11, 2023, 10:31pm UTC](https://discuss.elastic.co/t/filebeat-not-deleting-disk-queue-segment-files/349094 "2023-12-11T22:31:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vis20953](https://avatars.discourse-cdn.com/v4/letter/v/a6a055/32.png) [@vis20953](https://discuss.elastic.co/u/vis20953)\
**Post date:** [December 11, 2023, 10:31pm UTC](https://discuss.elastic.co/t/filebeat-not-deleting-disk-queue-segment-files/349094/1 "2023-12-11T22:31:10Z")

</div>

Hi friends,

We are experiencing an issue where the Filebeat service does not delete the segment files in the disk queue, resulting in the service not sending log entries to Logstash when the max\_size has been reached:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/2/02c34a4f0bc34900f2d8a090c8626bf41a05f6aa.png)

Has anyone else experienced this issue? Is this meant to happen? We have to delete the disk queue folder to allow Filebeat to send log entries again.

My inference from the documentation is that these files are meant to be deleted but I'm not seeing that happen:

> **[Configure the internal queue | Filebeat Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuring-internal-queue.html#_segment_size)**

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)\
**Post date:** [January 2, 2024, 10:04am UTC](https://discuss.elastic.co/t/filebeat-not-deleting-disk-queue-segment-files/349094/2 "2024-01-02T10:04:18Z")

</div>

> [@vis20953](#):
>
> Hi friends,
> 
> We are experiencing an issue where the Filebeat service does not delete the segment files in the disk queue, resulting in the service not sending log entries to Logstash when the max\_size has been reached:
> 
> ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/2/02c34a4f0bc34900f2d8a090c8626bf41a05f6aa.png)
> 
> Has anyone else experienced this issue? Is this meant to happen? We have to delete the disk queue folder to allow Filebeat to send log entries again.
> 
> My inference from the documentation is that these files are meant to be deleted but I'm not seeing that happen:

hi,

Make sure that Filebeat has the necessary permissions to delete files in the disk queue directory.

Check the configuration of your Filebeat. Make sure that the `max_size` parameter in the `queue.disk` section is set to a value that is appropriate for your use case. Also, check the `write` and `read` parameters in the `queue.disk` section to ensure they are not causing a bottleneck.

---

<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 30, 2024, 12:04pm UTC](https://discuss.elastic.co/t/filebeat-not-deleting-disk-queue-segment-files/349094/3 "2024-01-30T12:04:56Z")

</div>

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