You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. So, I was testing Deno 1.9.2 with a workload that involves Temporal and a Postgres database. I noticed that after a few minutes, the 2GB VPS just ran out of memory after some batches of processing. I did the following:
Tried to profile using --inspect, but I noticed that it never went above 20MB, so it was probably not a "normal" JavaScript leak. I think Deno lacks GC information in the DevTools profiler, so that wasn't helpful.
I proceeded to compile Deno in debug mode, upload to VPS, run with the workload using LD_PRELOAD=/usr/lib/libtcmalloc.so and a HEAPPROFILE.
The results were in. And looks like it's Intl.DateTimeFormat that is at fault.
I couldn't change this memory ceiling by using --v8-flags=--max-old-space-size, so I guess it's completely external to that.
I think it's probably an issue in V8 itself that has not been correctly resolved, and deno and node both handle it differently. I will try to change Temporal to reuse the same Intl.DateTimeFormat instance, for now, but it would be nice if this could be fixed.
Hello. So, I was testing Deno 1.9.2 with a workload that involves Temporal and a Postgres database. I noticed that after a few minutes, the 2GB VPS just ran out of memory after some batches of processing. I did the following:
--inspect, but I noticed that it never went above 20MB, so it was probably not a "normal" JavaScript leak. I think Deno lacks GC information in the DevTools profiler, so that wasn't helpful.LD_PRELOAD=/usr/lib/libtcmalloc.soand aHEAPPROFILE.Intl.NumberFormat, peaks at 100M for node, and 258M for deno. I assume that is normal.--v8-flags=--max-old-space-size, so I guess it's completely external to that.I think it's probably an issue in V8 itself that has not been correctly resolved, and deno and node both handle it differently. I will try to change Temporal to reuse the same
Intl.DateTimeFormatinstance, for now, but it would be nice if this could be fixed.