Mateusz Urbański
Mateusz Urbański

Reputation: 7862

Exporting CSV with ActiveAdmin runs out of memory

I'm running out of memory on Heroku when try to export to csv 200 thousands records. This is not too much records so I think that active records is fetching data with inefficient way. How can I solve this problem?

Upvotes: 0

Views: 784

Answers (1)

dimakura
dimakura

Reputation: 7655

You can first write CSV into file and send it to client after this. Here is a good answer how to write large amount of data efficiently.

I hope there is a way in ActiveAdmin to override default behavior of CSV download.

Upvotes: 1

Related Questions