# Filebeat Registry Issue handling large number of files

**URL:** https://discuss.elastic.co/t/filebeat-registry-issue-handling-large-number-of-files/301885
**Category:** Beats
**Tags:** filebeat
**Created:** [April 7, 2022, 3:10pm UTC](https://discuss.elastic.co/t/filebeat-registry-issue-handling-large-number-of-files/301885 "2022-04-07T15:10:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KillerDAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/killerdan/32/104121_2.png) [@KillerDAN](https://discuss.elastic.co/u/KillerDAN)
#### Post date: [April 7, 2022, 3:10pm UTC](https://discuss.elastic.co/t/filebeat-registry-issue-handling-large-number-of-files/301885/1 "2022-04-07T15:10:55Z")

</div>

Currently running filebeat 7.17.2.

I have a setup where filebeat is "scrapping" a folder where per minute 5 (or more in future) CSV files are dropped and filebeat exports to kafka. (CSV are TWAMP telemetry data)  
Typically 5 days of files are kept to allow for backlog/ reprocessing should errors occur in NorthBound system consuming the information.

Doing some quick match for reference:

1H 300 files,  
12H 3600 files,  
24H 7200 files,  
5D 36000 files.

Every time I need to restart filebeat I need to delete its registry because it simply will not do nothing for hours except going through the registry. Last time waited +4 hours and it never got to process incoming files even when deleted all files older than 1 day.

My current config:

```auto
# filebeat export config
filebeat:
  inputs:
  - clean_inactive: 24h
    clean_removed: true
    close_eof: true
    close_removed: true
    exclude_lines:
    - ^CSVexport Version
    harvester_limit: 10
    ignore_older: 12h
    paths:
    - /mnt/spool/kafka/*.csv
    type: log

```

Looking at metrics from 15 minute interval:

```auto
# grep metrics filebeat.log| tail -10 | cut -c98- | jq '.monitoring.metrics.registrar.states.current'
13389
13464
13538
13614
13689
13763
13838
13914
13989
14060

```

What I am doing wrong ?

From my config should the active count not stop at 7200 at the most ?

Thank you,

---

<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 5, 2022, 5:10pm UTC](https://discuss.elastic.co/t/filebeat-registry-issue-handling-large-number-of-files/301885/2 "2022-05-05T17:10:58Z")

</div>

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