keystonejs/keystone-classic

CSV download in /api/list/download.js if interrupted will crash node

Open

#4,595 建立於 2018年3月8日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)JavaScript (14,656 star) (2,288 fork)batch import
4.x candidatebughelp wanted

描述

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

貢獻者指南