Skip to content

API Quotas for Monitoring #2576

Description

@keitwb

Hi, I'm using the MetricServiceClient for getting StackDriver timeseries. I am authenticating using a user oauth token (this user has access to multiple projects), but there seems to be a global quota across multiple projects because when I fetch only one or two projects at a time I have no throttling, but when I fetch four or five different projects at a time, I start getting throttled with errors like the following:

io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: Insufficient tokens for quota 'DefaultGroup' and limit 'USER-100s' of service 'monitoring.googleapis.com' for consumer 'project_number:764086051850'.

The strange thing is, that project_number doesn't correspond to any project I am fetching, or even have access to -- it is meaningless to me.

This appears to be the quota for # of requests per 100 seconds, but I have that set to 10,000 on all projects and I'm not doing nearly that many requests, as the quota historical chart in the web console confirms.

Is there really some global quota that applies across multiple projects and if so, is there some way to work around it?

Activity

  1. added
    api: monitoringIssues related to the Cloud Monitoring API.
    type: questionRequest for information or clarification. Not an issue.
    on Nov 8, 2017
  2. anthmgoogle commented on Nov 8, 2017

    @anthmgoogle

    This looks like it might be because of using shared credentials such as with "gcloud auth application-default login". We recommend using a downloaded service account key and setting the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to it:
    https://developers.google.com/identity/protocols/application-default-credentials#howtheywork
    This should let you adjust the quota for your API.

    Please advise if this does not fixed the problem.

  3. self-assigned this
    on Nov 8, 2017
  4. pongad commented on Jan 22, 2018

    @pongad
    Contributor

    I'll close this due to inactivity. Please reopen if required.

  5. added a commit that references this issue on Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: monitoringIssues related to the Cloud Monitoring API.authtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions