-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
After the build is completed, the esbuild process does not exit #3558
Comments
This is why your node process keeps running. That is not surprising. Once activated, the esbuild process stays around until node exits (for performance reasons), but should not keep node open due to how node's child process reference counting works. If you have a way to reproduce either the problem of esbuild keeping node open, or of esbuild using >50gb of memory, then please provide it here. In the meantime I'm marking this issue as |
I have a similar problem: after building I start
And the process consumes a bunch of memory: The more entry-points I had the more memory is consumed. I tried to start only express, just in case, and it takes around 30mb. Is there a way to tell ESBuild to calm down without moving it to a separate process? |
@evanw Is it possible to implement an api that can manually exit the esbuild child process, because I will only run |
Yes. There used to be an API for this but it was removed after #656 was implemented as it was not necessary (see version 0.9.0). However, the Deno API for esbuild currently does have a However, it would still be good to have a way to reproduce esbuild using >50gb of memory. That sounds like a bug unless you're doing something unusual with esbuild. |
@evanw OK, thanks a lot. I use esbuild to pre-build the node_modules code, and then compile the source code (src) with webpack. The usage code in watch mode is as following: const ctx = await esbuild.context(buildOptions);
await ctx.watch(); And I cannot reproduce esbuild useing more than 50G of memory (in my computer), so I want to avoid this problem by exiting esbuild manually. |
on deno the stop function does nothing |
When I use
esbuild.build
api to build, the node process does not exit, but esbuild cannot exit either.The reproduce code:
The terminal output screenshot:
The MacOS monitor screenshot:
I discovered this problem because my team member reported that running esbuild watch mode used 54G of memory on his computer.
The text was updated successfully, but these errors were encountered: