1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

メモリ不足でyarn dev出来ない

Last updated at Posted at 2021-02-11

vuepressを立ち上げたいがreactのプロジェクトをファイルに追加したら立ち上がらなくなった。

と同じエラー、、、

<--- Last few GCs --->


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF786DB1DDF napi_wrap+109135
 2: 00007FF786D56D06 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfElementsOffset+33350
 3: 00007FF786D57AD6 node::OnFatalError+294
 4: 00007FF7876264CE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF78760B31D v8::SharedArrayBuffer::Externalize+781
 6: 00007FF7874B574C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516
 7: 00007FF7874C0AAA v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258
 8: 00007FF7874BDC59 v8::internal::Heap::PageFlagsAreConsistent+2457
 9: 00007FF7874B27F1 v8::internal::Heap::CollectGarbage+2033
10: 00007FF7874B09F5 v8::internal::Heap::AllocateExternalBackingStore+1365
11: 00007FF7874CAD76 v8::internal::Factory::AllocateRaw+166

12: 00007FF7874DF49F v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString+79
13: 00007FF7872D19B9 v8::internal::String::SlowFlatten+441
14: 00007FF78717FFF0 unibrow::Utf8::EncodeOneByte+656
15: 00007FF787631E56 v8::String::Utf8Length+22
16: 00007FF786D755E7 v8::internal::Malloced::operator delete+17575
17: 00007FF7875D35FF v8::internal::Builtins::builtin_handle+321615
18: 00007FF7875D2B8E v8::internal::Builtins::builtin_handle+318942
19: 00007FF7875D2E87 v8::internal::Builtins::builtin_handle+319703
20: 00007FF7875D2CD3 v8::internal::Builtins::builtin_handle+319267
21: 00007FF7876AF0FD v8::internal::SetupIsolateDelegate::SetupHeap+464173
22: 00000329918A4815
error Command failed with exit code 134.

set NODE_OPTIONS=--max_old_space_size=4096を実行後
改善はされなかったが実行は鬼のように早くなった

参考
https://ja.ojit.com/so/node.js/1223622

<--- Last few GCs --->

[33508:0000019E89EDC590]    98134 ms: Mark-sweep 1853.2 (2087.0) -> 1852.7 (2079.5) MB, 450.7 / 0.2 ms  (average mu = 0.129, current mu = 0.031) allocation failure scavenge might not succeed
[33508:0000019E89EDC590]    98626 ms: Mark-sweep 1864.5 (2087.1) -> 1863.1 (2082.3) MB, 469.3 / 0.2 ms  (average mu = 0.087, current mu = 0.046) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF798161DDF napi_wrap+109135
 2: 00007FF798106D06 v8::internal::OrderedHashTable<v8::internal::OrderedHashSet,1>::NumberOfElementsOffset+33350
 3: 00007FF798107AD6 node::OnFatalError+294
 4: 00007FF7989D64CE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF7989BB31D v8::SharedArrayBuffer::Externalize+781
 6: 00007FF79886574C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516
 7: 00007FF798870AAA v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258
 8: 00007FF79886DC59 v8::internal::Heap::PageFlagsAreConsistent+2457
 9: 00007FF7988627F1 v8::internal::Heap::CollectGarbage+2033
10: 00007FF7988609F5 v8::internal::Heap::AllocateExternalBackingStore+1365
11: 00007FF79887AD76 v8::internal::Factory::AllocateRaw+166
12: 00007FF79888F49F v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString+79
13: 00007FF7986819B9 v8::internal::String::SlowFlatten+441
14: 00007FF79852FFF0 unibrow::Utf8::EncodeOneByte+656
15: 00007FF7989E1E56 v8::String::Utf8Length+22
16: 00007FF7981255E7 v8::internal::Malloced::operator delete+17575
17: 00007FF7989835FF v8::internal::Builtins::builtin_handle+321615
18: 00007FF798982B8E v8::internal::Builtins::builtin_handle+318942
19: 00007FF798982E87 v8::internal::Builtins::builtin_handle+319703
20: 00007FF798982CD3 v8::internal::Builtins::builtin_handle+319267
21: 00007FF798A5F0FD v8::internal::SetupIsolateDelegate::SetupHeap+464173
22: 000001DCC3664F15
error Command failed with exit code 134.

けど変わらなかったので他に問題があるらしい

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?