# Filebeat is not closig the file descriptor once the file is deleted/renamed

**URL:** https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-renamed/104077
**Category:** Beats
**Tags:** filebeat
**Created:** [October 16, 2017, 10:15am UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-renamed/104077 "2017-10-16T10:15:44Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![vkakhnych](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vkakhnych/32/23344_2.png) [@vkakhnych](https://discuss.elastic.co/u/vkakhnych)
#### Post date: [October 24, 2017, 9:38am UTC](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-renamed/104077/10 "2017-10-24T09:38:48Z")

</div>

Have the same issue. Old logs are rename each hour, then delete after hour of inactivity by script. But filebeat still keep all or many of them open. Can't reproduce in test lab, only on prod get it. Maybe it's related to intensive of logging.  
Config:

```
filebeat.prospectors:

- input_type: log

  paths:
    - /var/log/batch/Batch*-running.log

  close_inactive: 5m
  close_renamed: true
  clean_removed: true

```

close\_removed is enabled by default (according to official documentation)

filebeat-5.6.3-1.x86\_64  
Red Hat Enterprise Linux Server release 6.7

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-is-not-closig-the-file-descriptor-once-the-file-is-deleted-renamed/104077)._
