Getting Javascript Heap out of Memory quite often since 1.52.0 and 1.52.1
HI all,
I've been getting this quite often in the Immich-Microservice container.
It's been happening quite often now after 1.52.0 and 1.52.1.
Especially on the Storage Migration jobs and now at the Generate Thumbnails jobs. I'm assuming its not fully migrated yet to the new folders, so I'll try to let it run more until I hope it'll completely migrated.
<--- Last few GCs --->
[1:0x7fb16cefc330] 793094 ms: Scavenge (reduce) 2038.1 (2076.2) -> 2037.5 (2076.5) MB, 21.1 / 0.0 ms (average mu = 0.352, current mu = 0.391) allocation failure
[1:0x7fb16cefc330] 794130 ms: Scavenge (reduce) 2038.3 (2076.5) -> 2037.7 (2076.5) MB, 39.0 / 0.0 ms (average mu = 0.352, current mu = 0.391) allocation failure
[1:0x7fb16cefc330] 795665 ms: Scavenge (reduce) 2038.5 (2076.5) -> 2038.0 (2076.7) MB, 66.7 / 0.1 ms (average mu = 0.352, current mu = 0.391) allocation failure
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
I recall something about allocating the heap for Node.js b4... can't remember how I set that up that param.
5 Replies
You can always use
NODE_OPTIONS=--max-old-space-size=4096
, for exampleHow big is your library?
about

tho.. i would say i'm running on a 2017 Celeron with 16GB in hyper-v
so it's not a powerful PC.
and seems nowOK after a while only happens with Storage Migration job
that now is completed so I don't get that anymore
i guess its a 1-off trade off
lemme try to add that in the .env file
thx
Some things involve reading all assets into memory right now... We're working to not have to do that...