hashlips_art_engine: (node:11004) UnhandledPromiseRejectionWarning: Error: out of memory
When I tried to generate more than 10K images + Gifs together, I get the heap out or out of memory issue,
But I tried compile this with this command by increasing the allocated memory like this,
export NODE_OPTIONS=--max_old_space_size=204800
Still it crash in the middle of the generation.
Any solution?
Thank you!
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 21
It looks like the issue is caused by the
loadedElementsvariable not being GCd after each loop. We could empty it ourselves instead.@sujeewakabeysinghe after some investigation it looks like there might be a memory leak somewhere. I’ll keep looking.
canvas.toBufferinsaveImageseems to have an impact on performance (~84.4% of the time is spent there). I’ll have a look for the memory leak.@sujeewakabeysinghe I believe that’s meant to happen (aside from the crashing). Although there is room for optimisation.
@sujeewakabeysinghe could you post a screenshot of task manager (
ctrl+shift+esc) when you run into these errors please.