gemini-cli - 💡(How to fix) Fix ▀ High memory usage detected: 9.07 GB [1 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#26260Fetched 2026-05-01 05:53:01
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

│ error: undefined, │ │ Symbol(gaxios-gaxios-error): '6.7.1' │ Error when talking to Gemini API Full report available at: │ │ C:\Users\Info\AppData\Local\Temp\gemini-client-error-Turn.run-sendMessageStream-2026-04-30T13-56-35-559Z.json │ Error: Premature close

RAW_BUFFERClick to expand / collapse

What happened?

Debug Console (F12 to close) │ │ │ │ 'content-type': 'application/json; charset=UTF-8', │ │ date: 'Thu, 30 Apr 2026 14:09:28 GMT', │ │ server: 'ESF', │ │ 'server-timing': 'gfet4t7; dur=8303', │ │ vary: 'Origin, X-Origin, Referer', │ │ 'x-cloudaicompanion-trace-id': 'a21a8283fd9c88ee', │ │ 'x-content-type-options': 'nosniff', │ │ 'x-frame-options': 'SAMEORIGIN', │ │ 'x-xss-protection': '0' │ │ }, │ │ status: 429, │ │ statusText: 'Too Many Requests', │ │ request: { │ │ responseURL: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse' │ │ } │ │ }, │ │ error: undefined, │ │ status: 429, │ │ Symbol(gaxios-gaxios-error): '6.7.1' │ │ }

bug-report-history-1777558202983.json

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

What did you expect to happen?

Error when talking to Gemini API Full report available at: │ │ C:\Users\Info\AppData\Local\Temp\gemini-client-error-Turn.run-sendMessageStream-2026-04-30T13-56-35-559Z.json │ │ Error: Premature close │ │ at IncomingMessage.<anonymous> │ │ (file:///C:/Users/Info/AppData/Roaming/npm/node_modules/@google/gemini-cli/bundle/chunk-UIBQS45C.js:7893:28) │ │ at Object.onceWrapper (node:events:622:28) │ │ at IncomingMessage.emit (node:events:508:28) │ │ at emitCloseNT (node:internal/streams/destroy:148:10) │ │ at process.processTicksAndRejections (node:internal/process/task_queues:88:21) { │ │ code: 'ERR_STREAM_PREMATURE_CLOSE' │ │ }

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: dc9ead7f-8f1d-4ebd-9ab5-1ab64fe22246
  • Operating System: win32 v24.11.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 2.51 GB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

Google Account

Anything else we need to know?

No response

extent analysis

TL;DR

The issue is likely due to exceeding the rate limit for the Gemini API, resulting in a 429 "Too Many Requests" error, and a premature close error is also occurring.

Guidance

  • Verify the API request rate to ensure it's within the allowed limits.
  • Check the error message "Premature close" and the associated stack trace to identify potential issues with the API connection.
  • Review the gemini-client-error-Turn.run-sendMessageStream-2026-04-30T13-56-35-559Z.json file for more detailed error information.
  • Consider implementing exponential backoff or retry mechanisms to handle rate limit errors.

Notes

The issue may be related to the specific API endpoint or the client version (0.39.1) being used.

Recommendation

Apply a workaround, such as implementing rate limiting or exponential backoff, to mitigate the 429 error and premature close issue, as the root cause is likely related to the API request rate.

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

gemini-cli - 💡(How to fix) Fix ▀ High memory usage detected: 9.07 GB [1 participants]