# Request Entity Too Large when importing Kibana saved objects

**URL:** <https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497>\
**Category:** Kibana\
**Created:** [January 19, 2021, 6:56am UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497 "2021-01-19T06:56:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [January 19, 2021, 6:56am UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/1 "2021-01-19T06:56:54Z")

</div>

I'm trying to import a `ndjson` file with size 11.2 MB, but I'm getting the error `413 Request Entity Too Large` when trying to do that.  
I tried increasing the following values on `kibana.yml`

- `server.maxPayloadBytes: 104857600`
- `savedObjects.maxImportPayloadBytes: 104857600`  
And the following value on `elasticsearch.yml`
- `http.max_content_length: 500mb`  
But the problem persists.  
Any suggestion?  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/518df86eb09a7c9f671d325a9fd952a8be478e3b.png)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 19, 2021, 1:07pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/2 "2021-01-19T13:07:37Z")

</div>

Just to make sure - Did you restart Kibana and Elasticsearch after changing the settings?

Do you have a reverse proxy of some sort in front of Kibana? If yes please make sure it's also accepting large payloads.

---

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [January 19, 2021, 4:31pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/3 "2021-01-19T16:31:29Z")

</div>

Yes, I just did it once again restarting both instances and the failure persists.  
I don't have proxy, but I am using a VPN to access my company's internal network where I have the server hosting both kibana and elasticsearch.  
Is there ay way for me to debug it further to try to find the failing point?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 19, 2021, 5:23pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/4 "2021-01-19T17:23:31Z")

</div>

This seems correctly configured to me. Could you try to upload again and check Kibana and Elasticsearch logs for errors?

Another thing you could try is to import the file via saved objects api (to rule out something in the browser): [https://www.elastic.co/guide/en/kibana/current/saved-objects-api-import.html](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-import.html)

---

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [January 19, 2021, 8:00pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/5 "2021-01-19T20:00:11Z")

</div>

It seems the API is also failing the same way

```auto
$ curl -X POST http://myserver/api/saved_objects/_import?overwrite=false -H "kbn-xsrf: true" --user myuser:mypasswd --form file=@export_kibana.ndjson 
<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.14.1</center>
</body>
</html>

```

After executing it, I'm not seeing any new log messages either on `/var/log/elasticsearch/elasticsearch.log` or `journalctl -u kibana.service`

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 20, 2021, 8:09am UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/6 "2021-01-20T08:09:27Z")

</div>

This error message is created by an nginx server, but Kibana isn't using nginx. It looks like you have a nginx reverse proxy in front of your Kibana instance. Make sure to configure it in the same way (allowing large request bodies).

---

<div class="post-metadata">

**Author:** ![oskrdt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oskrdt/32/67457_2.png) [@oskrdt](https://discuss.elastic.co/u/oskrdt)\
**Post date:** [January 20, 2021, 9:31pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/7 "2021-01-20T21:31:48Z")

</div>

@flash1293 you were right! the missing configuration was not from kibana but from the **nginx** service since I'm using the RPM version.

I had to add `client_max_body_size 20M;` on the `/etc/nginx/nginx.conf` file and restart the **nginx** service. After that, I was able to perform the import.

---

<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:** [February 17, 2021, 9:31pm UTC](https://discuss.elastic.co/t/request-entity-too-large-when-importing-kibana-saved-objects/261497/8 "2021-02-17T21:31:55Z")

</div>

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