# How does logstash read multiple gunzipped files

**URL:** <https://discuss.elastic.co/t/how-does-logstash-read-multiple-gunzipped-files/249074>\
**Category:** Logstash\
**Created:** [September 18, 2020, 9:07am UTC](https://discuss.elastic.co/t/how-does-logstash-read-multiple-gunzipped-files/249074 "2020-09-18T09:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [September 18, 2020, 9:07am UTC](https://discuss.elastic.co/t/how-does-logstash-read-multiple-gunzipped-files/249074/1 "2020-09-18T09:07:48Z")

</div>

I have set up a simple logstash pipeline with a single file input (mode= 'read'). I have given a regex pattern in the path attribute. I am trying to read a number of gunzipped files matching the regex in the path. The thing I wanted to understand is how logstash reads and processes multiple files (especially when they .gz files), as some of them could be of the order of 100s of MBs and I am worried about logstash crashing if it tried to load multiple of them in the memory simultaneously and then uncompressing and processing them.

```auto
input {
          file {
                    path => "/tmp/a/*/*/*.log.gz" #path to .gz files contained in subfolders
                    mode => "read"
                    file_completed_action => "log"
                    file_completed_log_path => "/tmp/log.txt"
            }
    }

```

---

<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:** [October 16, 2020, 9:07am UTC](https://discuss.elastic.co/t/how-does-logstash-read-multiple-gunzipped-files/249074/2 "2020-10-16T09:07:53Z")

</div>

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