# FileBeat Setup Error : error loading index pattern: returned 413 to import file: \<nil\>. Response: {"statusCode":413,"error":"Request Entity Too Large","message":"Payload content length greater than maximum allowed: 1048576"

**URL:** <https://discuss.elastic.co/t/filebeat-setup-error-error-loading-index-pattern-returned-413-to-import-file-nil-response-statuscode-413-error-request-entity-too-large-message-payload-content-length-greater-than-maximum-allowed-1048576/264845>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 19, 2021, 11:35am UTC](https://discuss.elastic.co/t/filebeat-setup-error-error-loading-index-pattern-returned-413-to-import-file-nil-response-statuscode-413-error-request-entity-too-large-message-payload-content-length-greater-than-maximum-allowed-1048576/264845 "2021-02-19T11:35:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biswabhusan\_Dash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/biswabhusan_dash/32/84187_2.png) [@Biswabhusan\_Dash](https://discuss.elastic.co/u/Biswabhusan_Dash)\
**Post date:** [February 19, 2021, 11:35am UTC](https://discuss.elastic.co/t/filebeat-setup-error-error-loading-index-pattern-returned-413-to-import-file-nil-response-statuscode-413-error-request-entity-too-large-message-payload-content-length-greater-than-maximum-allowed-1048576/264845/1 "2021-02-19T11:35:22Z")

</div>

We are working to capture logs from server to elasticsearch by filebeat. We are getting below issue, while setup the filebeat.

Response: {"statusCode":413,"error":"Request Entity Too Large","message":"Payload content length greater than maximum allowed: 1048576"}

We have added http.max\_content\_length: 1200mb in elasticsearch.yml and server.maxPayloadBytes: 26214400 in kibana.yml. Still this issue is there.

How to resolve this issue?

Here is the YML files we are using for FileBeat, ElasticSearch & Kibana

**FileBeat.yml**

filebeat.inputs:

- type: logenabled: true paths:
  - c:\logs\XXX\*

- type: filestreamenabled: falsepaths:
  - /var/log/\*.log

filebeat.config.modules: path: ${path.config}/modules.d/\*.yml

reload.enabled: false

setup.template.settings: index.number\_of\_shards: 1

setup.kibana:

```auto
host: "0.0.0.0:0000"
username: "XXXX"
password: "XXXX"

```

output.elasticsearch: hosts: ["0.0.0.0:0000"]

username: "XXXX" password: "XXXX"

processors:

- add\_host\_metadata: when.not.contains.tags: forwarded
- add\_cloud\_metadata: ~
- add\_docker\_metadata: ~
- add\_kubernetes\_metadata: ~

**ElasticSearch.yml**

- module: elasticsearch server: enabled: truegc: enabled: trueaudit: enabled: trueslowlog: enabled: truedeprecation: enabled: trueaccess: var.paths: ["/var/logs/XXX/XXX.log"]http.max\_content\_length: 1200mb

**Kibana.yml**

- module: kibanalog: enabled: trueaudit: enabled: trueserver.maxPayloadBytes: 26214400

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 22, 2021, 12:51am UTC](https://discuss.elastic.co/t/filebeat-setup-error-error-loading-index-pattern-returned-413-to-import-file-nil-response-statuscode-413-error-request-entity-too-large-message-payload-content-length-greater-than-maximum-allowed-1048576/264845/2 "2021-02-22T00:51:37Z")

</div>

Welcome to our community! 😃  
Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you.

> [@Biswabhusan\_Dash](#):
>
> http.max\_content\_length: 1200mb in elasticsearch.yml

That's a little excessive and likely to cause potential OOM issues.

> [@Biswabhusan\_Dash](#):
>
> We are getting below issue, while setup the filebeat.
> 
> Response: {"statusCode":413,"error":"Request Entity Too Large","message":"Payload content length greater than maximum allowed: 1048576"}

Can you post the actual command you are running and the raw response?

---

<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:** [March 22, 2021, 2:52am UTC](https://discuss.elastic.co/t/filebeat-setup-error-error-loading-index-pattern-returned-413-to-import-file-nil-response-statuscode-413-error-request-entity-too-large-message-payload-content-length-greater-than-maximum-allowed-1048576/264845/3 "2021-03-22T02:52:32Z")

</div>

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