-
Notifications
You must be signed in to change notification settings - Fork 95
Worker terminated due to reaching memory limit: JS heap out of memory #127
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
Comments
I have the same issue except that I only have |
It's a regression in 0.4.4, I have the same error. Downgraded it to resolve the problem. F.y.i |
🤔 Guess this is related to vue-tsc watch mode. I made a minimal repro without vite-plugin-checker and it seems like there's a potential memory leak. vuejs/language-tools#1106 |
Seems like it's fixed in [email protected]. Try it out :) |
Hmm, a number of us are getting out-of-memory on |
Just an update after a few days using 0.4.4 and [email protected], most of the time is fine. However, I still experienced 2-3 times out of memory problems. |
Could you provide your vite config? Does the OOM occur after a long time of development without the process terminated? |
Does the OOM occur after a long time of development without the process terminated. |
That's correct. |
This comment was marked as off-topic.
This comment was marked as off-topic.
We have some preliminary results that it may be people had it crash after a few restarts on Node v12, but not Node v14. export default defineConfig({
build: {
outDir: "vbuild",
rollupOptions: {
output: {
manualChunks: undefined,
},
},
},
esbuild: {
logLevel: "error",
},
plugins: [
react(),
checker({ overlay: false, typescript: true }),
process.env.VISUALIZE && visualizer({ filename: "stats.html", open: true }),
],
server: {
fs: {
strict: false,
allow: ["..", "node_modules"],
},
},
resolve: {
alias: [
...aliases,
// Need this for dat-gui but its kinda iffy
{ find: "node_modules", replacement: resolve(__dirname, "node_modules") },
],
},
}); |
Hey dude, I did that, I will be using it for a few days to see things have been improved. Cheers. |
Hitting this issue too in a Vue 2 project using |
Please also track vuejs/language-tools#1108, it is break changes but it will reduce a half of memory usage. |
Does this problem resolved in vue-tsc 0.34 later? |
I
I have to stop using the checker due to this issue.... |
Situation got better (crash happens after ~15 mins vs ~5 mins in my case), but issue is still there. |
@maiolica Thanks for the information. Could you try run |
Error happens after the first incremental compilation (project has ~1000 Vue components) Error stack[15:24:04] File change detected. Starting incremental compilation...
<--- Last few GCs --->
[34719:0x118008000] 9764258 ms: Mark-sweep 4032.2 (4130.9) -> 4016.5 (4131.2) MB, 2904.7 / 0.0 ms (average mu = 0.085, current mu = 0.024) allocation failure scavenge might not succeed
[34719:0x118008000] 9767871 ms: Mark-sweep 4032.8 (4131.4) -> 4017.4 (4131.9) MB, 3481.9 / 0.0 ms (average mu = 0.060, current mu = 0.036) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x104efc5d4 node::Abort() [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
2: 0x104efc754 node::OnFatalError(char const*, char const*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
3: 0x10502c0a4 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
4: 0x10502c038 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
5: 0x105163fe8 v8::internal::Heap::GarbageCollectionReasonToString(v8::internal::GarbageCollectionReason) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
6: 0x1051668f0 v8::internal::Heap::MarkCompactPrologue() [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
7: 0x1051645b0 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
8: 0x105162a30 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
9: 0x10516b3a0 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
10: 0x10516b420 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
11: 0x10514912c v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
12: 0x1053d7c3c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
13: 0x105651b4c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
14: 0x10562e248 Builtins_MapIteratorPrototypeNext [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
15: 0x10c136d90
16: 0x10dfb94e8
17: 0x10c66fa20
18: 0x10c8127d8
19: 0x10dfb9bf4
20: 0x10bca84bc
21: 0x10bc3281c
22: 0x10dfb9304
23: 0x10c66fa20
24: 0x10c8127d8
25: 0x10dfb9bf4
26: 0x10bca84bc
27: 0x10bc32b14
28: 0x10dfb9304
29: 0x10bca84bc
30: 0x10bc3281c
31: 0x10bbde0e4
32: 0x10c59881c
33: 0x10de54364
34: 0x10bbde6b0
35: 0x10c5f8000
36: 0x10c611090
37: 0x10bcba050
38: 0x10bcd3530
39: 0x10c108468
40: 0x10c7d06c4
41: 0x10bd539b0
42: 0x10d709190
43: 0x10d714ac0
44: 0x10c71c990
45: 0x10c25d014
46: 0x10bd64b70
47: 0x10c7d04b0
48: 0x10bd5b438
49: 0x10da54a84
50: 0x10c27bab4
51: 0x10c5eb6b8
52: 0x10bb35cf0
53: 0x10bd5ee60
54: 0x10c7d0e68
55: 0x10c2b8498
56: 0x10dafa524
57: 0x10c6b609c
58: 0x10c65e918
59: 0x10c6b5224
60: 0x10c65e918
61: 0x10c829e04
62: 0x10c6b621c
63: 0x10c851da0
64: 0x10c695650
65: 0x10c6b6a5c
66: 0x10c65e918
67: 0x10c5e9b6c
68: 0x10c6b664c
69: 0x10c65e918
70: 0x10bc28ee8
71: 0x10d6a0c10
72: 0x10d6b2644
73: 0x10c16e974
74: 0x10c7ce6f8
75: 0x10c5ba764
76: 0x10dd0aa4c
77: 0x10dd0ab2c
78: 0x10db631cc
79: 0x10c274d7c
80: 0x10d6f8694
81: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
82: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
83: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
84: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
85: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
86: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
87: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
88: 0x1055e57d8 Builtins_InterpreterEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
89: 0x1055e35cc Builtins_JSEntryTrampoline [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
90: 0x1055e3264 Builtins_JSEntry [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
91: 0x10510b2d8 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
92: 0x10510a988 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
93: 0x105040694 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
94: 0x104eaebb0 node::Environment::RunTimers(uv_timer_s*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
95: 0x10714399c uv__run_timers [/opt/homebrew/Cellar/libuv/1.44.1/lib/libuv.1.dylib]
96: 0x107146764 uv_run [/opt/homebrew/Cellar/libuv/1.44.1/lib/libuv.1.dylib]
97: 0x104e50b60 node::SpinEventLoop(node::Environment*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
98: 0x104f312ec node::NodeMainInstance::Run(int*, node::Environment*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
99: 0x104f30fbc node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
100: 0x104ed2670 node::Start(int, char**) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
101: 0x1071a1088
[1] 34719 abort node_modules/vue-tsc/bin/vue-tsc.js --noEmit --watch
|
Hey guys, |
I have same problem:
|
Please track vuejs/language-tools#1106. |
This problem should be fixed in vue-tsc v0.38.8. |
I have an error similar to @piotrpalek , breaking HMR. Disabling the checker plugin solves it.
running my vite with the following environment var from #72 seems to reduce the frequency of this crash. command:
|
I got this error after upgrading a Quasar project to use vue-tsc / plugin checker. Adding some missing excludes to {
"extends": "@quasar/app-vite/tsconfig-preset",
"compilerOptions": {
"baseUrl": "."
},
"exclude": [
"./dist",
"./.quasar",
"./node_modules",
"./src-capacitor",
"./src-cordova",
"./quasar.config.*.temporary.compiled*"
]
} |
I'm facing this issue with WSL2, any ideas? The Exclude solution and |
Same issue here React TS project, excluding the vite-plugin-checker no errors occur anymore. Tried exclude and TSC_WatchFile, but no difference. Happening only on one machine in our team (Ryzen 6850U 16GB), and did not happen until about 3 month ago. puzzled |
Describe the bug
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
Reproduction
current setting:
Expected behavior
no heap out of memory error, or ability to increase memory limit
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: