gemini-cli - 💡(How to fix) Fix high memory use [2 comments, 3 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#25574Fetched 2026-04-18 05:57:51
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1
RAW_BUFFERClick to expand / collapse

What happened?

high memory use. I have been having frequent crashes, so I upped the memory limit from 500m to 8g and it still ran over the limit

bug-report-history-1776414359965.json

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL OMFORTABLE SHARING IT.

What did you expect to happen?

reasonable memory use with prining, not crashing

Client information

  • CLI Version: 0.38.1
  • Git Commit: 7f5580034
  • Session ID: e463e36-bda4-4f66-9d71-b774ec3a98da
  • Operating System: linux v22.22.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3.1-pro-preview0A* Auth Type: oauth-personal
  • Memory Usage: 9.20 GB
  • Terminal Name: VTE(8400)
  • Terminal Background: #000000
  • Kitty Keyboad Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

Increasing the memory limit to 8g did not prevent crashes, suggesting the issue may be related to memory usage patterns rather than just the limit itself.

Guidance

  • Review the attached bug-report-history-1776414359965.json file for clues on what might be causing the high memory usage, such as specific operations or patterns that precede the crashes.
  • Consider monitoring system resources in real-time to identify if there are specific times or actions that correlate with increased memory usage.
  • Evaluate if there are any memory-intensive features or plugins enabled that could be contributing to the high usage.
  • Check for any known issues or discussions related to memory management in the CLI version 0.38.1 or the Gemini model version gemini-3.1-pro-preview0.

Example

No specific code snippet can be provided without more context on the operations being performed, but reviewing system logs or the JSON file for patterns may help identify problematic areas.

Notes

The provided information does not specify what actions were being taken when the crashes occurred, which could be crucial in diagnosing the issue. Additionally, the effectiveness of increasing the memory limit suggests that the problem might not be solely with the limit but with how memory is being utilized.

Recommendation

Apply workaround: Since the root cause is not immediately clear and simply increasing the memory limit did not resolve the issue, focusing on identifying and mitigating the specific cause of high memory usage through monitoring and review of the provided JSON file is recommended.

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