node-oom-heapdump
node-oom-heapdump copied to clipboard
Used memory is doubled when creating on request heapdumps, and isn't cleared after the heapdump is done
Hi, thanks for the package, it's been very useful to me!
I've read the readme and I know that the increased memory usage is expected during on request heapdumps, but is it expected that the memory usage never goes back to it's initial value after the dump is done, even after manually calling garbage collection ?
I have a web server running on Node v14.18.2 and pm2 v5.1.2 . Right after starting the application the memory usage is around 300mb, and after creating an on demand heapdump it's about 600mb. I tried waiting, and after 12 hours it's still at 600mb. Manually calling garbage collection doesn't do anything. I tried creating another heapdump, and this time the memory didn't double, but still increased to around 900mb. Is this expected ? This becomes an issue when creating multiple dumps in order to compare them
I must say that i never had any issues with it, even with very low max-old-space-size settings.
So not sure which figures you're looking at?
Do you even specify max-old-space-size? Otherwise the default of 4G is used from the top of my head.
stale