google-cloud-go icon indicating copy to clipboard operation
google-cloud-go copied to clipboard

pubsub error: rpc error: code = ResourceExhausted desc = Insufficient tokens for quota 'administrator' and limit 'CLIENT_PROJECT-100s' of ...

Open vsiv opened this issue 8 years ago • 4 comments

Hi,

I have about 2K pubsub topics, but after creating about 1.3K subscriptions (1 subscriber per topic), I am seeing this error -

pubsub error: rpc error: code = ResourceExhausted desc = Insufficient tokens for quota 'administrator' and limit 'CLIENT_PROJECT-100s' of of service 'pubsub.googleapis.com' for consumer 'project_number:...

Am I hitting into any quotas? The google console quota page does not seem to show any warnings..

And, I am able to create subscriptions via the browser console manually. Needlessly to say its quite painful to create 800 subscriptions by hand.

Any help on this matter is greatly appreciated.

PS. I am retrying 3 times (I could try exp backoff) but I continue to see the errors. On occasions some subscription creations succeed within 3 attempts. But majority of the time, I see a repeat of the same error.

Thanks.

vsiv avatar Feb 15 '18 07:02 vsiv

This certainly looks like a quota issue. I don't know why you don't see it in the dashboard. I'm contacting the team internally.

How long are you sleeping between retries?

jba avatar Feb 15 '18 12:02 jba

Sleeping for 30 seconds between requests. Thanks for your help!

PS. Just a quick update - more subscription creation has gone through after more retries. So maybe it’s a time based quota restriction for creating topics and subscriptions.

vsiv avatar Feb 15 '18 13:02 vsiv

The "100s" in the error message means 100 seconds. Try sleeping at least that long.

Also, are you authenticating with default credentials or a service account? If you're using default credentials, you may be subject to a stricter quota than if you were using a service account from your project. That might also explain why you don't see anything on the quota page.

jba avatar Feb 15 '18 13:02 jba

I just switched to service account creds and also sleeping longer. Seems like now, the create requests are going through with limited set of errors. I will close this issue for now.

Thanks for your help! V

vsiv avatar Feb 15 '18 15:02 vsiv