# Unable to generate CSV

**URL:** https://discuss.elastic.co/t/unable-to-generate-csv/132183
**Category:** Elasticsearch
**Created:** [May 16, 2018, 4:51pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183 "2018-05-16T16:51:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Diego\_Auza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_auza/32/31284_2.png) [@Diego\_Auza](https://discuss.elastic.co/u/Diego_Auza)
#### Post date: [May 16, 2018, 4:51pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/1 "2018-05-16T16:51:32Z")

</div>

Hi,

I seem to be having an issue while generating reports for large amounts of data for export on CSV. I wanted to confirm if I'm hitting some kind of max size or if this is some kind of configuration issue. Currently, I am trying to pull a twitter users database for analysis on graph data, but I can only generate 20MB. While this will be a large dataset, I'm wondering if I'm hitting a hard cap on how large the export can be. Even after increasing the timeout time on kibana.yml, the maxcsv size and the http.max\_content\_length on elastichsearch.yml, I still cannout generate a report. Below I have included the error I am seeing in our kibana.log file:

Blockquote  
{"type":"log","@timestamp":"2018-01-29T19:37:16Z","tags":["reporting","esqueue","worker","debug"],"pid":18707,"message":"jd0lg6ox0efn7d14ac7atpm2 - Failure occurred on job jd0m5q9p0efn7d14ac3iy2o0: Error: "toString()" failed\n at Buffer.toString (buffer.js:495:11)\n at MaxSizeStringBuilder.getString (/usr/share/kibana/plugins/x-pack/plugins/reporting/export\_types/csv/server/lib/max\_size\_string\_builder.js:20:46)\n at /usr/share/kibana/plugins/x-pack/plugins/reporting/export\_types/csv/server/lib/generate\_csv.js:51:24\n at next (native)\n at step (/usr/share/kibana/plugins/x-pack/plugins/reporting/export\_types/csv/server/lib/generate\_csv.js:20:191)\n at /usr/share/kibana/plugins/x-pack/plugins/reporting/export\_types/csv/server/lib/generate\_csv.js:20:361"}  
{"type":"log","@timestamp":"2018-01-29T19:37:16Z","tags":["reporting","worker","debug"],"pid":18707,"message":"CSV: Worker error: (jd0m5q9p0efn7d14ac3iy2o0)"}  
Blockquote

Is there a way to dump large datasets (~ 2GB)?

Thank you!

---

<div class="post-metadata">

### Author: ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)
#### Post date: [May 18, 2018, 5:43pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/2 "2018-05-18T17:43:53Z")

</div>

Did you try the xpack.reporting.csv.maxSizeBytes setting in kibana.yml?

[https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html](https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html)

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [May 22, 2018, 3:56pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/3 "2018-05-22T15:56:59Z")

</div>

It's not recommended to set `xpack.reporting.csv.maxSizeBytes` to something as large as 2 GB. All CSV exports end up creating a single document in Elasticsearch to store the CSV which can then be downloaded later, and storing a 2 GB document isn't something you want to do. This will likely error out if you set it too high as Elasticsearch enforces a max request size, and even if you increased that setting you're going to use a large amount of heap when trying to index a 2 GB document.

---

<div class="post-metadata">

### Author: ![Diego\_Auza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_auza/32/31284_2.png) [@Diego\_Auza](https://discuss.elastic.co/u/Diego_Auza)
#### Post date: [May 28, 2018, 12:17pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/4 "2018-05-28T12:17:19Z")

</div>

so what is the solution for large datasets?

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [May 29, 2018, 12:06pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/5 "2018-05-29T12:06:54Z")

</div>

@Diego_Auza the proper solution is detailed in this [GitHub Issue](https://github.com/elastic/kibana/issues/18322) if you would like to give it a +1 or comment with your usage, it'll help us prioritize it appropriately.

---

<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: [June 26, 2018, 12:07pm UTC](https://discuss.elastic.co/t/unable-to-generate-csv/132183/6 "2018-06-26T12:07:04Z")

</div>

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