gemini-cli - 💡(How to fix) Fix FATAL ERROR: Reached heap limit Allocation failed - JavaScript 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#26974Fetched 2026-05-14 03:46:08
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×7added_to_project_v2 ×1commented ×1issue_type_added ×1

Error Message

running standard commands/prompts took longer than usual to process esc'd and started again still took long then fatal error FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory i am trying to attached .heapsnapshot but get this error: Error File type .heapsnapshot not supported. See the documentation for supported file types.

RAW_BUFFERClick to expand / collapse

What happened?

running standard commands/prompts took longer than usual to process esc'd and started again still took long then fatal error <--- Last few GCs --->

[112805:0x1b227b30] 63473098 ms: Mark-Compact 1655.2 (1835.4) -> 1639.8 (1835.4) MB, 214.94 / 0.01 ms (average mu = 0.531, current mu = 0.537) task; scavenge might not succeed [112805:0x1b227b30] 63473547 ms: Mark-Compact 1659.2 (1838.8) -> 1646.8 (1842.6) MB, 205.01 / 0.00 ms (average mu = 0.537, current mu = 0.543) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

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

1: 0xb78db3 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/bin/node] 2: 0xee8300 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/bin/node] 3: 0xee85e7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/bin/node] 4: 0x10fb205 [/usr/bin/node] 5: 0x1113088 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node] 6: 0x10e91f1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node] 7: 0x10ea385 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node] 8: 0x10c69a6 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/usr/bin/node] 9: 0x10b8304 v8::internal::FactoryBasev8::internal::Factory::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/usr/bin/node] 10: 0x10bb667 v8::internal::FactoryBasev8::internal::Factory::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/bin/node] 11: 0x140ce75 v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handlev8::internal::ConsString, v8::internal::AllocationType) [/usr/bin/node] 12: 0x10cb48c v8::internal::Factory::NewProperSubString(v8::internal::Handlev8::internal::String, int, int) [/usr/bin/node] 13: 0x1545dba v8::internal::Runtime_StringSubstring(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node] 14: 0x195e476 [/usr/bin/node]

What did you expect to happen?

process the prompt

Client information

  • CLI Version: 0.42.0
  • Git Commit: 68e2196d5
  • Session ID: bb278696-fc07-4276-95c1-0fdce48396a9
  • Operating System: linux v20.20.2
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 466.8 MB
  • Terminal Name: Unknown
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Unsupported

Login information

google auth

Anything else we need to know?

i am trying to attached .heapsnapshot but get this error: Error File type .heapsnapshot not supported. See the documentation for supported file types.

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