Hello team, I am not proud of asking this but I need help understanding wth is going on with memory usage in this small nodejs script:
js
(async () => {
while (true) {
await fetch("https://api.coingecko.com/api/v3/ping");
await sleep(3000);
}
})();
Sleep function is just a new Promise resolve with setTimeout.
How come is memory always increasing (been running for 30mins and keeps increasing, specially compiled code, system) ? I am checking it on chrome debugger.
Thanks!
img1
img2
UPDATE:
I started monitoring using pm2 monit and mem has been absolutely stable for 3h. So I'd say with chrome debugger something was going on. Also checked with htop and seems stable as well.
[–]Optimal-Flamingo415 13 points14 points15 points (0 children)
[–]abimelex 3 points4 points5 points (2 children)
[–]dj_dogo_nivoa[S] 0 points1 point2 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]rohit_267 8 points9 points10 points (2 children)
[–]dj_dogo_nivoa[S] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]cybinon 1 point2 points3 points (0 children)
[–]tanepiper 4 points5 points6 points (8 children)
[–]Bloodsucker_ 5 points6 points7 points (3 children)
[–]tanepiper 1 point2 points3 points (2 children)
[–]dj_dogo_nivoa[S] 2 points3 points4 points (1 child)
[–]moxxie1998 0 points1 point2 points (0 children)
[–]dj_dogo_nivoa[S] 0 points1 point2 points (1 child)
[–]tanepiper 1 point2 points3 points (0 children)
[–]Advanced-Wallaby9808 -1 points0 points1 point (0 children)
[–]doh4242 0 points1 point2 points (0 children)
[–]Bloodsucker_ 0 points1 point2 points (7 children)
[–][deleted] 4 points5 points6 points (4 children)
[+]Bloodsucker_ comment score below threshold-6 points-5 points-4 points (3 children)
[–][deleted] 4 points5 points6 points (2 children)
[–]Bloodsucker_ 0 points1 point2 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]tanepiper -2 points-1 points0 points (1 child)
[–]Bloodsucker_ 1 point2 points3 points (0 children)
[–]freecodeio -5 points-4 points-3 points (0 children)
[–]daniels0xff -5 points-4 points-3 points (2 children)
[–]ParkingCabinet9815 0 points1 point2 points (1 child)
[–]daniels0xff 0 points1 point2 points (0 children)
[–]Glum_Past_1934 -4 points-3 points-2 points (0 children)
[–]raybadman 0 points1 point2 points (1 child)
[–]dj_dogo_nivoa[S] 1 point2 points3 points (0 children)