-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node process on Windows 11 consumes memory continuously, increasing about 3mb a second without being released #3976
Comments
I only noticed this issue because it started increasing my laptop fan when it reached 5GB of RAM consumed. |
This is after 30 minutes. Screen.Recording.2025-01-01.142119_stripped.mp4 |
It does seem to partially garbage collect periodically, just not very much. |
Sounds like an issue with Vite. Have you tried upgrading it? |
How do I upgrade Vite? |
@scotscoder I also had this issue with vite using 25-32gb of ram out of 128gb, Edit:Initially I thought this fixed the issue I was partially mistaken, it wasn't the setting at all it was a hot reload of the vite.config.ts/js that stops the cpu and ram usage, no other file edits seem to do the same only on the vite config. vite.config.ts/jsimport { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
server:{
hmr:{
overlay: false
}
},
plugins: [sveltekit()]
});
Package versions: To update your vite to the latest you will need to check your package manager documentation as npm/yarn/pnpm have slightly different commands for updating. |
After a lot of testing I have narrowed it down to wails causing the issue in nodejs, best guess is the ipc or runtime injection. Tested on vanilla template and custom sveltekit frontend with skeleton. wails dev pnpm dev (in frontend) If you hot reload the vite config when using wails dev, the CPU% drops and RAM stops increasing does not decrease though. Inspecting the node process in devtools shows the vm only being ~100mb or less in size, which is vastly different from the task manager view. Using x64dbg attached to node I observed alot of : If I attached to the build go exe and pause the node process still keeps increasing, Edit: Doesn't cause this issue in wails3 |
Thanks for taking the time to deep dive this. The only difference that I can think of between a dev and prod build is Go flags so I'm more convinced it's a vite HMR issue. Someone on this thread mentioned it stopped when turning off an error option in Vite stopped it. If your project is a simple html page what does it do? |
Description
When running
wails dev
, the node process gradually consumes more and more memory, slowing down the host system. As observed, it increases by about 2.5 to 6mb per second on my system. GIF attached.This happens with a completely new Svelte project. I will test it with other JS frameworks as well and update this issue.
Screen.Recording.2025-01-01.133325.mp4
To Reproduce
Use Windows 11.
wails dev
Expected behaviour
Memory use should stay constant or "breathe" slightly up and down.
Screenshots
Screencap attached above
Attempted Fixes
Found a closed bug on the SvelteKit repo that mentioned a similar problem. It may be upstream from even that, but I'd rather check before we dive deeper.
System Details
Additional context
No response
The text was updated successfully, but these errors were encountered: