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

JavaScript heap out of memory #11

Open
whanklee opened this issue Jun 4, 2021 · 2 comments
Open

JavaScript heap out of memory #11

whanklee opened this issue Jun 4, 2021 · 2 comments

Comments

@whanklee
Copy link

whanklee commented Jun 4, 2021

Hi,

I got this error while using exporter:

<--- JS stacktrace --->

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

Security context: 0x12e2541a5ee9
1: push [/snapshot/cassandra-exporter/node_modules/through/index.js:~40] [pc=0x16b6f4aa3168](this=0x1e159d91d079 ,data=0x2e4ce8b56df1 <Very long string[2340]>)
2: /* anonymous */ [/snapshot/cassandra-exporter/node_modules/JSONStream/index.js:~193] [pc=0x16b6f4aa06bd](this=0x1e159d91d079 ,data=0x1d9652942621 <Object map = 0x272fb64...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [./export-linux]
2: 0x1213ecc [./export-linux]
3: v8::Utils::ReportOOMFailure(char const*, bool) [./export-linux]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [./export-linux]
5: v8::internal::Factory::NewByteArray(int, v8::internal::PretenureFlag) [./export-linux]
6: v8::internal::TranslationBuffer::CreateByteArray(v8::internal::Factory*) [./export-linux]
7: v8::internal::compiler::CodeGenerator::PopulateDeoptimizationData(v8::internal::Handlev8::internal::Code) [./export-linux]
8: v8::internal::compiler::CodeGenerator::FinalizeCode() [./export-linux]
9: v8::internal::compiler::PipelineImpl::FinalizeCode() [./export-linux]
10: v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl() [./export-linux]
11: v8::internal::Compiler::FinalizeCompilationJob(v8::internal::CompilationJob*) [./export-linux]
12: v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [./export-linux]
13: v8::internal::StackGuard::HandleInterrupts() [./export-linux]
14: v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [./export-linux]
15: 0x16b6f490463d
Aborted (core dumped)

free -g output:
total used free shared buff/cache available
Mem: 3 1 1 0 0 1
Swap: 1 0 1

Could you help me to solve this issue? Thank you very much.

@masumsoft
Copy link
Owner

You may want to try increasing the heap size. For example to set heap size to 4GB:

NODE_OPTIONS="--max-old-space-size=4096" HOST=127.0.0.1 KEYSPACE=from_keyspace_name ./export

@whanklee
Copy link
Author

whanklee commented Jun 5, 2021

I try to run this command, however, I got an error message:

NODE_OPTIONS="--max-old-space-size=4096" HOST=cassandra-host KEYSPACE=keyspace USER=user PASSWORD=pass USE_SSL=true ./export-linux

Error:
Pkg: FLAGS_MISMATCH

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