keystonejs/keystone-classic

[0.x] Keystone OOMkilled on large CSV export

Open

#2592 aperta il 8 apr 2016

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (2288 fork)batch import
bughelp wanted

Metriche repository

Star
 (14.656 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

When exporting a keystone list as csv, the entire backing collection is loaded into memory before sending the response. This renders the export feature useless for a large collection; keystone will exhaust the available memory on the machine until it gets OOMkilled.

Instead, the export should be streamed back to the client so that we never load more than a cursor's worth of data in memory.

Guida contributor