14

I sometimes get the following error when creating a subscription:

Insufficient tokens for quota 'administrator' and limit 'CLIENT_PROJECT-100s' of service 'pubsub.googleapis.com' for consumer 'project_number:'

Waiting it out does the trick, but I'd like to increase the quota. In the IAM & Admin section of the Google Cloud Console, I can filter on the Pub/Sub API, but can't find the limit...

IAmCoder
  • 2,674
  • 1
  • 21
  • 40

3 Answers3

14

You are running up against the quota for administrative operations. In the Quotas page, under "Quota type," select "All quotas," then under "Service" select "Google Cloud Pub/Sub API." The quota you want to increase is "Administrator operations per 100 seconds," which you can update up to the maximum allowed limit of 10,000 per 100 seconds, as detailed on the Pub/Sub quota page. Here is a screenshot of the entity you need to update: Google Cloud Console Quotas page

Kamal Aboul-Hosn
  • 9,349
  • 23
  • 34
  • 3
    Thanks for the detailed walk-through...GCP is a vast sprawling thing so the screenshot & good instructions are great to see. – Randy L Jun 22 '17 at 19:32
  • I updated to 10k and I am still getting the error message. When I look at the "used column" (pictured in your attachment), it shows that it is not even being used. There is something else going on where this is triggered without actually hitting the quota. I am making zero admin calls. – Robert Christian Jan 16 '18 at 14:11
  • What API are you calling that is generating the error? – Kamal Aboul-Hosn Jan 16 '18 at 14:16
1

I was hitting a similar error.

I checked the quota section — as per Kamal Aboul-Hosn's suggestion — however it was already maxed out.

A work around was to put a sleep function in the code so the API wouldn't get hammered over a hundred second period. I hope that helps.

Sam Perry
  • 2,246
  • 3
  • 23
  • 27
0

According to AboulHosen on the GCP Slack:

"It does look like quota is pooled across users of the default application credentials and that the quota is significantly lower for users authenticated in this way. I believe when going to app engine, a service account is created (https://cloud.google.com/appengine/docs/flexible/python/access-control#using_service_accounts), so I would not anticipate this error happening when running on app engine."

So the reason this is happening is because the quota for your admin credentials is being consumed elsewhere, and as far as I know, there is no way to increase this!