question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MultiCompiler didn't release memory after one compiler is finished.

See original GitHub issue

Bug report

What is the current behavior? I use MultiCompiler configs.
If i run them one by one, Webpack can build them all.

const config = {}
webpack(config)

If i run them together, OOM appeares.

const configs = [config1, config2, config3, config4]
webpack(configs)

If the current behavior is a bug, please provide the steps to reproduce. MultiCompiler uses more memory than single compiler.

What is the expected behavior? Each compiler should work separately. when one is finished, who’s memory should be released.

Other relevant information: webpack version: 5.70.0 Node.js version: 14.17.1 Operating System: macOS 11.6 Additional tools: none

Part of configuration entries (each compiler): 2 + 159 + 230 cache: dsiabled mode: ‘production’ loaders: babel / postcss / vue-laoder minimizer: terser / css-minimizer-webpack-plugin devtool: false target: [‘web’, ‘es5’]

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
vankopcommented, Jun 30, 2022

first of all we need to solve memory leak issue with module graph… otherwise all modules will be in this WeakMap until compiler. _cleanupLastCompilation will not be called…

1reaction
VisonMcommented, Aug 2, 2022

first of all we need to solve memory leak issue with module graph… otherwise all modules will be in this WeakMap until compiler. _cleanupLastCompilation will not be called…

the same problem we have too. I record mutli times momory useage in chrome devtool after compiler.close trigger.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing for Security :: Immunant, Inc
The multicompiler optimizes for security by introducing randomness into the compilation process. It can generate an unlimited number of program ...
Read more >
44215 – Running out of memory when compiling. - Bugs
I've used 1.1.4 and the memory is *not* freed after an ajc compile, ... to AspectJ' the compilation ended with OutOfMemoryError (512M used...
Read more >
Node Interface - webpack
The MultiCompiler module allows webpack to run multiple configurations in separate compilers. If the options parameter in the webpack's NodeJS api is an...
Read more >
Linux Allocator Does Not Release Small Chunks of Memory
in second, it is 1024k. First never released the allocations back to the kernel for some reason or another. Why does the first...
Read more >
How to compile when the machine has not enough memory?
After trying to compile on a virtualbox and sending the file over, I get an error of "invalid ELF header" when I try...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found