NodeJs (Nest) memory increasing
After deploying my app, the memory has a continuous increase of memory:
https://gyazo.com/10893b31756dc0be5e73f902576d6e03
I tried to null all my obejcts and variables after using, but the issue is still there...
Any idea?
Gyazo
Gyazo Screen Video
6 Replies
Project ID:
84834faa-629f-4eee-a90d-be5a7c6b698d
84834faa-629f-4eee-a90d-be5a7c6b698d
That's how JavaScript garbage control works. Eventually you will see the ram usage drop and climb again
Thank you @TurboFarmer9000, is there any way to control it? Unfortunately memory usage affects directly to the service cost 😦
Since it's javascript, not much, but give this a try:
-> Make sure you're running in prod mode
-> See if Nest has some configs to help on that
I would also suggest optimizing code but tbh this is primarly how node works, it's gonna use a fair bit of ram one way or another
The best way to reduce usage is migrating from JS lmao, for example there's a guy running a Go server with the 5usd free trial using 16mb, it will run for aprox. 2 years for free lmfao
Thanks a lot!