gemini-cli - 💡(How to fix) Fix JS heap out of memory [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26768Fetched 2026-05-11 03:28:48
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
0
Timeline (top)
labeled ×7added_to_project_v2 ×1commented ×1issue_type_added ×1

Error Message

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

RAW_BUFFERClick to expand / collapse

What happened?

JS out of memory, even though dynamic heap adjustment was enabled. So I don't get it.

<--- Last few GCs --->▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ workspace (/directory) branch sandbox /model context quota memory [1665:0xc2280c000] 21735558 ms: Mark-Compact 2042.9 (2076.2) -> 2038.8 (2076.4) MB, pooled: 3 MB, 40.50 / 0.00 ms (average mu = 0.835, current mu = 0.082) allocation failure; scavenge might not succeed [1665:0xc2280c000] 21735653 ms: Mark-Compact 2044.7 (2078.3) -> 2040.7 (2086.0) MB, pooled: 0 MB, 78.79 / 0.00 ms (average mu = 0.684, current mu = 0.171) allocation failure; scavenge might not succeed

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace -----

1: 0x10394ac70 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/local/bin/node] 2: 0x1024afefc v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/local/bin/node] 3: 0x1024afeb4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/local/bin/node] 4: 0x10268f3a0 v8::internal::Heap::stack() [/opt/local/bin/node] 5: 0x10268db70 v8::internal::Heap::CheckMemoryPressure() [/opt/local/bin/node] 6: 0x1026854e4 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/local/bin/node] 7: 0x10265bf8c v8::internal::FactoryBasev8::internal::Factory::AllocateRawArray(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/opt/local/bin/node] 8: 0x10265bd08 v8::internal::FactoryBasev8::internal::Factory::NewFixedArrayWithFiller(v8::internal::DirectHandlev8::internal::Map, int, v8::internal::DirectHandlev8::internal::HeapObject, v8::internal::AllocationType) [/opt/local/bin/node] 9: 0x102906650 v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Allocate(v8::internal::Isolate*, int, v8::internal::AllocationType) [/opt/local/bin/node] 10: 0x102905898 v8::internal::Handlev8::internal::OrderedHashMap::MaybeType v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Rehashv8::internal::Handle(v8::internal::Isolate*, v8::internal::Handlev8::internal::OrderedHashMap, int) [/opt/local/bin/node] 11: 0x1029081fc v8::internal::Handlev8::internal::OrderedHashMap::MaybeType v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::EnsureCapacityForAddingv8::internal::Handle(v8::internal::Isolate*, v8::internal::Handlev8::internal::OrderedHashMap) [/opt/local/bin/node] 12: 0x1029d360c v8::internal::Runtime_MapGrow(int, unsigned long*, v8::internal::Isolate*) [/opt/local/bin/node] 13: 0x102eb2234 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/local/bin/node] 14: 0x102e79b60 Builtins_MapPrototypeSet [/opt/local/bin/node] 15: 0x102e79294 Builtins_MapConstructor [/opt/local/bin/node] 16: 0x102e11b8c Builtins_JSBuiltinsConstructStub [/opt/local/bin/node] 17: 0x12804186c 18: 0x128e309a0 19: 0x128d357b8 20: 0x128e1c354 21: 0x128aacc38 22: 0x102e537e8 Builtins_AsyncFunctionAwaitResolveClosure [/opt/local/bin/node] 23: 0x102f28e58 Builtins_PromiseFulfillReactionJob [/opt/local/bin/node] 24: 0x102e42bd0 Builtins_RunMicrotasks [/opt/local/bin/node] 25: 0x102e127b0 Builtins_JSRunMicrotasksEntry [/opt/local/bin/node] 26: 0x1025e9bfc v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/local/bin/node] 27: 0x1025ea2a4 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/local/bin/node] 28: 0x1025ea394 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [/opt/local/bin/node] 29: 0x10260e398 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/local/bin/node] 30: 0x10260e1b4 v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/local/bin/node] 31: 0x102e16818 Builtins_CallApiCallbackGeneric [/opt/local/bin/node] 32: 0x127987434 33: 0x102e128cc Builtins_JSEntryTrampoline [/opt/local/bin/node] 34: 0x102e12570 Builtins_JSEntry [/opt/local/bin/node] 35: 0x1025e9c2c v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/local/bin/node] 36: 0x1025e961c v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandlev8::internal::Object, v8::internal::DirectHandlev8::internal::Object, v8::base::Vector<v8::internal::DirectHandlev8::internal::Object const>) [/opt/local/bin/node] 37: 0x1024c0b98 v8::Function::Call(v8::Isolate*, v8::Localv8::Context, v8::Localv8::Value, int, v8::Localv8::Value) [/opt/local/bin/node] 38: 0x102257d38 node::InternalCallbackScope::Close() [/opt/local/bin/node] 39: 0x102257f64 node::InternalMakeCallback(node::Environment, v8::Localv8::Object, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value, node::async_context, v8::Localv8::Value) [/opt/local/bin/node] 40: 0x10226a3d0 node::AsyncWrap::MakeCallback(v8::Localv8::Function, int, v8::Localv8::Value) [/opt/local/bin/node] 41: 0x1023f7464 node::StreamBase::CallJSOnreadMethod(long, v8::Localv8::ArrayBuffer, unsigned long, node::StreamBase::StreamBaseJSChecks) [/opt/local/bin/node] 42: 0x1023f8a98 node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const&) [/opt/local/bin/node] 43: 0x10247cfb8 node::crypto::TLSWrap::ClearOut() [/opt/local/bin/node] 44: 0x10247c4e0 node::crypto::TLSWrap::Cycle() [/opt/local/bin/node] 45: 0x10247ebb8 node::crypto::TLSWrap::OnStreamRead(long, uv_buf_t const&) [/opt/local/bin/node] 46: 0x1023fbfc8 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/opt/local/bin/node] 47: 0x1023fc474 node::LibuvStreamWrap::ReadStart()::$_1::__invoke(uv_stream_s*, long, uv_buf_t const*) [/opt/local/bin/node] 48: 0x102dfc92c uv__stream_io [/opt/local/bin/node] 49: 0x102e03f04 uv__io_poll [/opt/local/bin/node] 50: 0x102df396c uv_run [/opt/local/bin/node] 51: 0x102258df4 node::SpinEventLoopInternal(node::Environment*) [/opt/local/bin/node] 52: 0x1023443b4 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/local/bin/node] 53: 0x102344148 node::NodeMainInstance::Run() [/opt/local/bin/node] 54: 0x1022da32c node::Start(int, char**) [/opt/local/bin/node] 55: 0x18ff3fda4 start [/usr/lib/dyld]

What did you expect to happen?

Nothing

Client information

  • CLI Version: 0.41.2
  • Git Commit: b0c7a1722
  • Session ID: 2b792140-f205-49e1-911f-9b70d95e4604
  • Operating System: darwin v24.15.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 465.5 MB
  • Terminal Name: Unknown
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING