threads-plugin icon indicating copy to clipboard operation
threads-plugin copied to clipboard

Webpack crashes (JavaScript heap out of memory)

Open Patbox opened this issue 3 years ago • 21 comments

Hello. I'm using this plugin and I have small problem. When I use it sometimes just crashes (with 1 worker it's random, it always crashes with 2).

Webpack Config: webpack.config.js

Here is crash report:


> [email protected] start /home/patbox/Pulpit/voxelsrv/client
> cd src/main/ && npx webpack-dev-server

ℹ 「wds」: Project is running at http://0.0.0.0:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/patbox/Pulpit/voxelsrv/client/docs
Warning (worker-plugin): output.globalObject is set to "window". It must be set to "self" to support HMR in Workers.

<--- Last few GCs --->
ca[17128:0x3301540]    94766 ms: Mark-sweep 2048.7 (2054.9) -> 2048.4 (2056.2) MB, 1134.6 / 0.0 ms  (+ 128.5 ms in 32 steps since start of marking, biggest step 9.3 ms, walltime since start of marking 1280 ms) (average mu = 0.121, current mu = 0.013) alloca[17128:0x3301540]    96041 ms: Mark-sweep 2050.0 (2056.2) -> 2049.6 (2057.9) MB, 1157.7 / 0.0 ms  (+ 103.5 ms in 25 steps since start of marking, biggest step 9.6 ms, walltime since start of marking 1275 ms) (average mu = 0.069, current mu = 0.011) alloca

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x13a71b9]
    1: StubFrame [pc: 0x1328831]
    2: ConstructFrame [pc: 0x13282cf]
Security context: 0x3500dd0c08d1 <JSObject>
    3: parsePropertyAccessExpressionRest(aka parsePropertyAccessExpressionRest) [0x3a3bea02a349] [/home/patbox/Pulpit/voxelsrv/client/node_modules/typescript/lib/typescript.js:~32289] [pc=0x1c109f6de69a](this=0x0e9f4e8004b1 <undefined>,1645143,0x049964a70431 <TokenObject map = 0x10f40fdc4219>,...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20201127.102801.17128.0.001.json
Node.js report completed
 1: 0x9ef190 node::Abort() [node]
 2: 0x9f13b2 node::OnFatalError(char const*, char const*) [node]
 3: 0xb5da9e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb5de19 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xd0a765  [node]
 6: 0xd0adf6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xd1760a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xd18515 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xd1afcc v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xce19bb v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x10246ce v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x13a71b9  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] start: `cd src/main/ && npx webpack-dev-server`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patbox/.npm/_logs/2020-11-27T09_28_01_623Z-debug.log

Patbox avatar Nov 27 '20 09:11 Patbox