keystonejs/keystone-classic
View on GitHubCSV download in /api/list/download.js if interrupted will crash node
Open
#4595 opened on Mar 8, 2018
4.x candidatebughelp wanted
Description
Expected behavior
When trying to download > 100k records using the CSV download button. It should either download, warn that the size is too large or timeout gracefully.
Actual/Current behavior
A blank page is presented while the babyparse.unparse is running. If this is interrupted by the user the entire keystone site can not be accessed until it is restarted by pm2. Memory is maxed out. CPU is low. Nothing in the logs.
Steps to reproduce the actual/current behavior
Create a mongo collection with 200k+ records. Click download csv from the collections admin page.
Environment
| Software | Version |
|---|---|
| Keystone | keystone@4.0.0-beta.5 |
| Node | v7.10.1 |
Linux ip-172-30-0-112 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
From Top:- 825 ubuntu 20 0 1983552 308980 2296 R 0.3 62.0 0:29.66 node keystone.js