# Using Logstash http input filter, what is the max file size limit can be sent to it?

**URL:** <https://discuss.elastic.co/t/using-logstash-http-input-filter-what-is-the-max-file-size-limit-can-be-sent-to-it/240839>\
**Category:** Logstash\
**Created:** [July 12, 2020, 12:55pm UTC](https://discuss.elastic.co/t/using-logstash-http-input-filter-what-is-the-max-file-size-limit-can-be-sent-to-it/240839 "2020-07-12T12:55:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agniv\_Gon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/agniv_gon/32/71944_2.png) [@Agniv\_Gon](https://discuss.elastic.co/u/Agniv_Gon)\
**Post date:** [July 12, 2020, 12:55pm UTC](https://discuss.elastic.co/t/using-logstash-http-input-filter-what-is-the-max-file-size-limit-can-be-sent-to-it/240839/1 "2020-07-12T12:55:34Z")

</div>

I am using Logstash 7.7.1 and using below conf for my logstash. I am trying to send .gz file and in header passing Content-Encoding: gzip which is working fine. But I am clueless about the max size limit which I can send to it. Sometimes I am getting 413 Request Entity Too Large.

According to http input plugin [https://github.com/logstash-plugins/logstash-input-http/blob/master/lib/logstash/inputs/http.rb](https://github.com/logstash-plugins/logstash-input-http/blob/master/lib/logstash/inputs/http.rb)  
`config :max_content_length, :validate => :number, :required => false, :default => 100 * 1024 * 1024` which looks like 100 MB. Is it the correct config which I am looking at or is there any other properties file in logstash to look for the max file size limit?

```
// Configuration

```

```auto
        input {
          http {
            host => "0.0.0.0"
            port => 8443
            max_pending_requests => 500
            ssl => "false"
            ssl_verify_mode => "none"
          }
        }

        filter {
        if "PNG" in [message] or "%PDF-" in [message] { drop { } }
        }

        output {
            file {
                path => "../../logstash-client-logs/%{[headers][application_name]}/myapplication-logstash-client-%{+yyyy-MM-dd}.log"
                codec => line { format => "%{[message]}"}
            }

        }

```

---

<div class="post-metadata">

**Author:** ![Agniv\_Gon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/agniv_gon/32/71944_2.png) [@Agniv\_Gon](https://discuss.elastic.co/u/Agniv_Gon)\
**Post date:** [July 24, 2020, 7:06am UTC](https://discuss.elastic.co/t/using-logstash-http-input-filter-what-is-the-max-file-size-limit-can-be-sent-to-it/240839/2 "2020-07-24T07:06:55Z")

</div>

`config :max_content_length, :validate => :number, :required => false, :default => 100 * 1024 * 1024`  
This is for the uncompressed file size(actual file size). But if we are sending any compressed file, say .gz file of 5KB and the actual file size inside the gzip is of 120KB then this particular configuration will validate for the actual file size which is 120KB and not the compressed file size we are sending.

---

<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:** [August 21, 2020, 7:21am UTC](https://discuss.elastic.co/t/using-logstash-http-input-filter-what-is-the-max-file-size-limit-can-be-sent-to-it/240839/3 "2020-08-21T07:21:12Z")

</div>

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