Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Gemini Experimental, RESOURCE_EXHAUSTED

Hi community, 

I am using the model : gemini-experimental, and eventhough I do not exceed the quota limit (10), I am getting the error 

ClientError: 429 RESOURCE_EXHAUSTED. {‘error’: {‘code’: 429, ‘message’: ‘Online prediction request quota exceeded for gemini-experimental. Please try again later with backoff.’, ‘status’: ‘RESOURCE_EXHAUSTED’}}

I checked the quota graph and the max is usage is 7, no sure why it says RESOURCE_EXHAUSTED

Does anyone have faced this?

 

Solved Solved
0 2 414
1 ACCEPTED SOLUTION

Hi @luiscs-dj,

Welcome to Google Cloud Community!

It looks like you are encountering a RESOURCE_EXHAUSTED error message, specifically a 429 error code, while using the Gemini–Experimental model, even though you haven’t reached the maximum limit of your quota.

Here are the potential ways that might help you with your use case:

  • Implement a exponential Backoff: You may implement an exponential backoff to deal with your transient errors and rate limiting to your selected model.
  • Retry mechanism: Consider implementing a retry mechanism in your code; this will enable your application to automatically retry failed requests after a brief delay.
  • Reduce concurrent requests: If your application is making multiple requests simultaneously from different parts, consider limiting the number of concurrent requests.
  • Check your Code: Reviewing your code can help you ensure that you are not unintentionally making duplicate or unnecessary requests.
  • Simplify your Prompts: Consider breaking down your complex tasks into smaller, more manageable tasks, or using simpler prompts that are still effective in achieving your goal.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

 

 

 

View solution in original post

2 REPLIES 2

Hi @luiscs-dj,

Welcome to Google Cloud Community!

It looks like you are encountering a RESOURCE_EXHAUSTED error message, specifically a 429 error code, while using the Gemini–Experimental model, even though you haven’t reached the maximum limit of your quota.

Here are the potential ways that might help you with your use case:

  • Implement a exponential Backoff: You may implement an exponential backoff to deal with your transient errors and rate limiting to your selected model.
  • Retry mechanism: Consider implementing a retry mechanism in your code; this will enable your application to automatically retry failed requests after a brief delay.
  • Reduce concurrent requests: If your application is making multiple requests simultaneously from different parts, consider limiting the number of concurrent requests.
  • Check your Code: Reviewing your code can help you ensure that you are not unintentionally making duplicate or unnecessary requests.
  • Simplify your Prompts: Consider breaking down your complex tasks into smaller, more manageable tasks, or using simpler prompts that are still effective in achieving your goal.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

 

 

 

@MarvinLlamas thank you for your help. I implemented the exponential backoff and it seems to be working.