Google Prediction API: programmatic vs. API Explorer access and “User Rate Limit Exceeded” error.

StackOverflow https://stackoverflow.com/questions/10611412

  •  09-06-2021
  •  | 
  •  

Вопрос

I'm having a problem using the Google Prediction API. I don't know what information might be relevant so I will provide everything that may be relevant. I apologize if this is too much information.

I'm using the Google Prediction API in a web app. I started by training a model via the API Explorer. When I tried to access the trained model via a Java program running on GAE and using Service Account authentication I was not able to see the model. I then trained a model using the same files in the same bucket programmatically from my Java program. Now I can use the model from my program, but I cannot see the model using the API explorer. When I look at the API usage in the API Console I see it going up as I expect based on the web app running (I have only 1 program that is using Google APIs). I also changed the per-use limit to 200 req/sec/user in the quota tab.

The problem that I'm having is that when my program makes a series of prediction calls, the 5th call fails with the message "User Rate Limit Exceeded". The 5 calls occur over 5 seconds (the actual request period is a few hundredths of a second over 1 second).

I'm assuming that the 200 req/sec limit that I'm setting through the console is not being applied to the model that I'm using and the default 1 req/sec rate is being applied (hence 5 req in 5 secs breaking it). I further assume that this is happening for the same reason that I cannot see that model from the API explorer, but I don't know this for sure.

When I use the API Explorer I'm logged in using the same account that owns the API account and GAE account and the same account that I was logged in to when I generated the p12 key and the Service Account that I'm using to call the Prediction API.

Does anyone see anything that may explain why I'm seeing what I'm seeing/

Это было полезно?

Решение

Problem solved. It was the OAuth server that was giving the error. I'm surprised that the OAuth server would have such a restriction.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top