Request Entity Too Large when importing Kibana saved objects

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?

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.

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?

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):

It seems the API is also failing the same way

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

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

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).

@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.

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