R
Railway•3mo ago
Roger P

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?
6 Replies
Percy
Percy•3mo ago
Project ID: 84834faa-629f-4eee-a90d-be5a7c6b698d
Roger P
Roger POP•3mo ago
84834faa-629f-4eee-a90d-be5a7c6b698d
TurboFarmer9000
TurboFarmer9000•3mo ago
That's how JavaScript garbage control works. Eventually you will see the ram usage drop and climb again
Roger P
Roger POP•3mo ago
Thank you @TurboFarmer9000, is there any way to control it? Unfortunately memory usage affects directly to the service cost 😦
Medim
Medim•3mo ago
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
Roger P
Roger POP•3mo ago
Thanks a lot!
Want results from more Discord servers?
Add your server