Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Random (403) User Rate Limit Exceeded

I am using translate API to translate some texts in my page, those texts are large html formated texts, so I had to develop a function that splits these texts into smaller pieces less than 4500 characters (including html tags) to avoid the limit of 5000 characters per request, also I had to modify the Google PHP API to allow send requests via POST.

I have enabled the paid version of the api in Goole Developers Console, and changed the total quota to 50M of characters per day and 500 requests/second/urser.

Now I am translating the whole database of texts with a script, it works fine but at some random points I revive the error "(403) User Rate Limit Exceeded", and I have to wait some minutes to re-run the script because when reached the error the api is returning the same error over and over until I wait some time.

I don't know why it keeps returning the error if I don't pass the number of requests, it's like it has some kind of maximum chaaracters per each interval of time or something...

like image 579
David Rojo Avatar asked Feb 22 '15 18:02

David Rojo


People also ask

How do I fix 403 user rate limit exceeded?

Resolve a 403 error: Project rate limit exceededRaise the per-user quota in the Google Cloud project. For more information, request a quota increase. Batch requests to make fewer API calls. Use exponential backoff to retry the request.

How do you fix a rate limit exceeded?

If you receive an error message like “API rate limit exceeded” or “You are being rate limited”, that is the website telling you it's time to slow down. On Cryptowatch, this issue is indicated by error #803 . Typically, slowing down is all you need to do to solve the issue.

What is the meaning of user rate limit exceeded?

User Rate Limit Exceeded. Means that you are hitting a user rate quota. User rate quotas are flood protection they ensure that a single user of your application can not make to many requests at once. These quotas can not be extended.

How do I fix Google authorization error 403?

You can try to fix error 403 in Google Chrome by refreshing the page, double-checking the address, clearing the cache and cookies from your browser, confirming that you have the authorization to view the page, contacting the website directly, or returning to the page later.


2 Answers

You probably exceed the quota limits you set before: this is either the daily billable or the limit on the request characters per second.

To change the usage limits or request an increase to your quota, do the following: 1. Go to the Google Developers Console "https://console.developers.google.com/". 2. Select a project. 3. On the left sidebar, expand APIs & auth. 4. Click APIs. 5. Click the name of an activated API you're interested in "i.e. The Translate API". 6. Near the top of the info page for the API, click Quota.

  • If you have the billing enabled, just click Quota and it will take you to the quota page where you can view and change the quota-related settings.

  • If not, clicking Quota shows information about any free quota and limits that apply to the Translate API.

like image 52
Mohab Avatar answered Nov 05 '22 01:11

Mohab


Google Developer Console has a rate limit of 10 requests per second, regardless of the settings or limits you may have changed.

You may be exceeding this limit.

I was unable to find any documentation around this, but could verify it myself with various API requests.

like image 40
Jess Telford Avatar answered Nov 05 '22 02:11

Jess Telford