最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory - Stack Overflow

programmeradmin6浏览0评论

I have a little bug in my console. Every time I try to run my app it breaks.

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7889B815F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114079
2: 00007FF7889454C6 DSA_meth_get_flags+65542
3: 00007FF78894637D node::OnFatalError+301
4: 00007FF78927BA0E v8::Isolate::ReportExternalAllocationLimitReached+94        
5: 00007FF789265FED v8::SharedArrayBuffer::Externalize+781
6: 00007FF7891093BC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468   
7: 00007FF7891064D4 v8::internal::Heap::CollectGarbage+4244
8: 00007FF7891036D6 v8::internal::Heap::AllocateExternalBackingStore+86
9: 00007FF78901D18D v8::internal::BackingStore::Allocate+205
10: 00007FF7892777FC v8::ArrayBuffer::NewBackingStore+124
11: 00007FF78896A1D9 node::Buffer::New+121
12: 00007FF788966BEB node::Buffer::Copy+1643
13: 00007FF78929DDEF v8::internal::SetupIsolateDelegate::SetupHeap+53823
14: 000001F7AD43B467 

I have a little bug in my console. Every time I try to run my app it breaks.

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7889B815F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114079
2: 00007FF7889454C6 DSA_meth_get_flags+65542
3: 00007FF78894637D node::OnFatalError+301
4: 00007FF78927BA0E v8::Isolate::ReportExternalAllocationLimitReached+94        
5: 00007FF789265FED v8::SharedArrayBuffer::Externalize+781
6: 00007FF7891093BC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468   
7: 00007FF7891064D4 v8::internal::Heap::CollectGarbage+4244
8: 00007FF7891036D6 v8::internal::Heap::AllocateExternalBackingStore+86
9: 00007FF78901D18D v8::internal::BackingStore::Allocate+205
10: 00007FF7892777FC v8::ArrayBuffer::NewBackingStore+124
11: 00007FF78896A1D9 node::Buffer::New+121
12: 00007FF788966BEB node::Buffer::Copy+1643
13: 00007FF78929DDEF v8::internal::SetupIsolateDelegate::SetupHeap+53823
14: 000001F7AD43B467 
Share Improve this question asked Apr 7, 2022 at 9:28 TeerLsTeerLs 571 silver badge7 bronze badges 5
  • 3 Hello. Your issue lack context for us to be able to help you. Could you please elaborate ? – Elley Commented Apr 7, 2022 at 9:30
  • I enter "npm start" and my app starts working. But after some changing node tries to rebuild my project and breaks with this problem – TeerLs Commented Apr 7, 2022 at 9:36
  • 2 @TeerLs This still does not provide any information which would help us to figure out what is going wrong. Provide information like code and also show your changes that resulted in this error. – Palladium02 Commented Apr 7, 2022 at 9:46
  • 1 @Palladium02 Every change breaks my runnig app – TeerLs Commented Apr 7, 2022 at 10:01
  • 1 @TeerLs without seing any code, anything could be happening. We can't have any idea of what is happening here. Try to get a minimal version of your code that generate the issue, and e back here with the code :) – Elley Commented Apr 7, 2022 at 10:17
Add a ment  | 

1 Answer 1

Reset to default 5

I have not a solid solution, but I want notice that from upgrade by angular 11 to 12, the our big application enterprise angular have got identical side effect of memory during changing of code . The crash heap error raise every two three change of code randomly.

I read that a possible solution is to change the option max_old_space_size with a value more high, ad example I setting 8198

export NODE_OPTIONS=--max_old_space_size=8198

Unluckly for me the problem remain, but maybe the investigation is to understand the options about developements debug system and to learn if there is a trick to fix this heap error during developing.

thanks in advance for any solutions, its appreciate

发布评论

评论列表(0)

  1. 暂无评论