Tunnel error Last few GCs and JS stacktrace

@emrekaraduman,

I’m running Ubuntu 24.04 (relatively newly available). On my machine I have twice the total & swap memory, and half the used memory at boot. After running forge deploy (and other commands), my used seems to settle at around 1.4GB, just like yours. Even if you have less memory, I don’t see anything indicating the WSL/Linux configuration is a problem.

I opened a sample app (the Confluence DACI Helper for no other reason than it was handy). After running Forge Tunnel (and leaving it open), my environment reports 2.2GB of memory used, where yours is several times higher. Maybe you could checkout that sample app and compare?

This leads me to recommend upgrading the major version of Node to v18, to match what is running inside Forge. I currently use fnm to manage Node versions, which you can learn about from my blog about developer configuration management. And I currently use a shared bin directory across those versions so I’m not managing multiple versions of the Forge CLI. Newer versions of Node might be even better at managing memory, so you could try v20 or even v22, if v18 doesn’t do enough. Even with newer versions, I’d also recommend the option from my above post.

My overall observation is that you really are running out of memory so you might need to get more, either physically for that machine, or virtually with a developer environment. There are many options these days; my personal experience so far is limited to GitHub Codespaces and AWS Cloud9. Whatever option you choose, you apparently need more RAM available to Node than 8GB.