Search code examples
google-workspacegoogle-books-api

Investigating quotaUser issues


I am using the Google Books API.

I currently have a Queries Per Day Limit of 1M, and a Queries per user per 100s Limit of 100.

I make requests in my server on behalf of users, so I use the quotaUser parameter.

Now, here's the rub:

In one step (when a user imports a CSV of books) -- I need to create a bunch of requests.

To do this, I send a random UUID as the quotaUser parameter, and make requests in parallel.

Here's the problem though:

Google Books still sometimes sends me 429s. It says:

Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'books.googleapis.com' for consumer 'project_number:XXXX

I don't understand how this could be. If quotaUser works, there's no way I would be sending more than 100 requests per minute for a single quotaUser id.

In what ways could I debug this?

When I look at Cloud Console, I don't see a page, where I can see exactly the params that are being sent (perhaps quotaUser is not coming in, or something like this)


Solution

  • For posterity, after research I realized this was a real bug on Google Books API. It's not too well integrated yet with Google Cloud -- quotaUser just doesn't work.