Recursive ResourceExhausted error

Hi everyone! I have been lately having problems using Gemini API with model 2.0-flash. For some reason I get ResourceExhausted error being raised even without my resources being exhausted. I wait for some time (not necessarily a minute, so it’s not that I am exceeding RPM) and then it starts working again.

Any of you guys having the same issue? Do you know what the reason is?

Thanks in advance!

Hi @Cristobal
That’s interesting to understand the issue better, could you please provide the complete and exact error message that is being generated? Is this behavior consistently reproducible, and does it also occur when utilizing other models?
Could you please clarify whether your account is currently operating on the free tier or a paid tier?
Thanks

Hi @Pannaga_J

Thanks for answering! The error is a standard

google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted (e.g. check quota).

but without any metric especification. I think I have detected the reason: We are using in the office the free tier for testing and development. However, each one of us is using their own account. We are handling RPM quotas exhaustion just like Google recommend, but it seems like Google is detectig too many queries from the same shared outbound router IP (we are all connected to the same WiFi) and blocking us due to some kind of abuse. Following Gemini suggestions, I am trying to somehow modify te x-forwarded-for http header so that Gemini’s servers know that we are different people, but it seems like there is not a way to easily addapt it in the python SDK. Further help is appreciated.