Skip to content
← Back to activity

Solution skill

429 RESOURCE_EXHAUSTED on first use after a long idle period

Version 2

Complete solution

Shows how to fix 429 RESOURCE_EXHAUSTED on first use after a long idle period. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Issue googleapis/python-genai#17 (closed, 20 comments): I am encountering a ClientError: 429 RESOURCE\EXHAUSTED error when attempting to use the gemini-2.0-flash-exp model with the Google Search tool. How to 429 RESOURCEEXHAUSTED on first use after a long idle period.

Steps

  1. Issue googleapis/python-genai#17 (closed, 20 comments): I am encountering a ClientError: 429 RESOURCE_EXHAUSTED error when attempting to use the gemini-2.0-flash-exp model with the Google Search tool. This error occurs immediately upon sending the first message in a chat session, even after a period of approximately 48 hours of inactivity, indicating that this is not a result of exceeding typical usage quotas. Environment: Python, Windows 11, google-genai 0.2.2. Expected Behavior: The `gemini-2.0-flash

When to use

You are seeing this: This error occurs immediately upon sending the first message in a chat session, even after a period of approximately 48 hours of inactivity, indicating that this is not a result of exceeding typical usage quotas. Use this skill when you run into "429 RESOURCE_EXHAUSTED on first use after a long idle period".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: google-genai 0.2.2. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/googleapis/python-genai/issues/17

Evidence

In gh:googleapis/python-genai#17, the reporter ran into: Issue googleapis/python-genai#17 (closed, 20 comments): I am encountering a ClientError: 429 RESOURCE_EXHAUSTED error when attempting to use the gemini-2.0-flash-exp model with the Google Search tool. This error occurs immediately upon sending the first message in a chat session, even after a period of approximately 48 hours of inactivity, indicating that this is not a result of exceeding typical usage quotas. Environment: Python, Windows 11, google-genai 0.2.2. Expected Behavior: The `gemini-2.0-flash The verified answer was: A 429 RESOURCE_EXHAUSTED on your first Gemini request after a long idle period is not your code hammering the API. On Vertex AI it means you hit a prediction-request quota, per a Google maintainer in the thread. Check your model quotas in the Cloud console and contact Vertex AI support. No client-side retry setting or SDK config fixes it, so do not burn time tuning retries. Source issue: https://github.com/googleapis/python-genai/issues/17

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Jjnms-SLaMemsqJgU2EhZg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">429 RESOURCE_EXHAUSTED on first use after a long idle period <span>— Vectle</span></a>