Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It crash with large number rows (> 10k rows) as out of heap memory #165

Open
minhngl opened this issue Jul 15, 2022 · 1 comment
Open

It crash with large number rows (> 10k rows) as out of heap memory #165

minhngl opened this issue Jul 15, 2022 · 1 comment

Comments

@minhngl
Copy link

minhngl commented Jul 15, 2022

I call �function "substitute" with data arrays of more than 10K rows, it crash as Javascript out of memory

template.substitute(sheetNumber, array_of_data);

Screen Shot 2022-07-15 at 14 31 14

Is there any way to avoid this?

Thanks.

@dragospaulpop
Copy link

That's the V8 engine running out of memory. By default, node uses a max of 1 or 2 GB of memory (depending on version).
The solution is to just give node more memory. Try running your script with the --max-old-space-size flag like this (change 8192, which means 8GB, to whatever you find suitable):
node --max-old-space-size=8192 your_script.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants