Skip to content
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

Not able to run analysis for big projects #53

Open
vrocky opened this issue Mar 29, 2021 · 1 comment
Open

Not able to run analysis for big projects #53

vrocky opened this issue Mar 29, 2021 · 1 comment

Comments

@vrocky
Copy link

vrocky commented Mar 29, 2021

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF71CAF058F napi_wrap+109311
2: 00007FF71CA952B6 v8::internal::OrderedHashTablev8::internal::OrderedHashSet,1::NumberOfElementsOffset+33302
3: 00007FF71CA96086 node::OnFatalError+294
4: 00007FF71D36153E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF71D3463BD v8::SharedArrayBuffer::Externalize+781
6: 00007FF71D1F084C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516
7: 00007FF71D1FBB8A v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258
8: 00007FF71D1F8D39 v8::internal::Heap::PageFlagsAreConsistent+2457
9: 00007FF71D1ED961 v8::internal::Heap::CollectGarbage+2033
10: 00007FF71D1EBB65 v8::internal::Heap::AllocateExternalBackingStore+1317
11: 00007FF71D20BF57 v8::internal::Factory::NewFillerObject+183
12: 00007FF71CF3BE3F v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1039
13: 00007FF71D3E9EED v8::internal::SetupIsolateDelegate::SetupHeap+463949
14: 000000E0C39A917A

@icemonster
Copy link

You can increase the maximum amount of memory for node with export NODE_OPTIONS=--max-old-space-size=3000 (this means 3000MB)

Unfortunately, even if you have enough memory, if your "project" is really big you may run into another issue because in V8 strings have a maximum length, the call to JSON.stringify that js-callgraph does internally may fail. I am working on a PR that solves that right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants