-
Notifications
You must be signed in to change notification settings - Fork 346
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
Vite and services refuse to work together #1569
Comments
I doubt this is related to devenv. The only way to figure out what's going on is by finding out what vite is doing. |
We have exactly the same problem as you. We tried updating every input in the lock file separately and as soon as we update the devenv input we get memory leaks until node crashes. We have tried running "vite dev --debug" and this doesn't show anything out of the ordinary. Also, if we let the node processes reach a certain level of memory use, devenv refuses to exit when doing a "Ctrl+C" in the active devenv terminal window. Here is a rather boring video which illustrates the behavior: |
I will be testing more and try running it again, but the last time I ran a vite profile(delete the result, silly me) I saw something like "_read" was taking a lot of performance. |
Okey so here are some profiles. The main differences are _read eating performance and the ones with processes and updated devenv continuously doing something(while other stop doing anything after 400ms). This is what i used to test this: {
languages.javascript.enable = true;
languages.javascript.bun.enable = true;
processes = {
vite.exec = "bun run dev"; #simply commenting this out for no processes.
};
} This is the vite version(it doesnt change between locks): |
I attached the chrome inspector to the node process and stepped through a few loops. The vite file watcher is getting caught in a symlink loop in The current workaround would be to configure vite to not watch |
The reason this is showing up after updating devenv is because we added |
I've reverted the ncurses PR until we can figure out a compromise. I didn't find a way to tell vite not to watch |
Bumped vite to 6.0 beta and the chokidar options now do something. export default {
server: {
watch: {
ignored: [ "**/.devenv/**" ],
// This would also work
// followSymlinks: true,
},
},
} |
Fixed by #1576. Please run |
(The only reason i asking this as question is i dont know if this is a bug)
When updating to devenv 1.3.1, for whatever reason when running vite dev in devenv environment while a services is included in config like mysql or mailpit, vite starts using 30-40% cpu and eat ram until crashes from javascript out of memory.
Otherwise it works fine when no services are included(
services.X.enable = false;
) and all processes are commend out with devenv up.Even funnier when i do:
It start doing the same thing as if service wound be included(which i mean it is, it self as service).
Here are some devenv files.
Im just confused if im doing something wrong?
The text was updated successfully, but these errors were encountered: