Skip to content

getEntries: Insufficient tokens for quota 'logging.googleapis.com/read_requests' and limit 'ReadRequestsPerMinutePerProject'  #91

@xMTinkerer

Description

@xMTinkerer

I am getting this error when ever I run the following code.

Error: Insufficient tokens for quota 'logging.googleapis.com/read_requests' and limit 'ReadRequestsPerMinutePerProject' of service 'logging.googleapis.com' for consumer 'project_number:1234567890123'.

Apparently, this is due to the "Read Requests" Quota which I see here:
https://console.cloud.google.com/apis/api/logging.googleapis.com/quotas?project=PROJECT_ID&authuser=1&duration=PT1H

image

However, this is literally the only code that is contributing to this quota. As you can see in the image, there are 0 entries until I run this code, then it spikes to 60 per minute and I get the error above. I'm guessing there is something deeper in the getEntries function that makes an additional call that contributes to the "Read Requests" quota, but I can't tell what it might be. I may not be looking deep enough though.

Environment details

  • OS: MacOS but also App Engine
  • Node.js version: v8.5.0
  • npm version: 5.6.0
  • @google-cloud/logging version: 1.1.4

Steps to reproduce

  1. Copy this code into a file or the repl. Replace INSTANCE_NAME, or not. The error occurs regardless of a good instance name.
const Logging = require( '@google-cloud/logging' );
const logging = new Logging();


var theLogFilter = 'jsonPayload.resource.name=INSTANCE_NAME';

var metadata;

logging.getEntries({
  filter: theLogFilter
}, (err, entries, nextQuery, apiResponse) => {

	if( err ) {
		console.log( "ERROR: " + err );
		return;
	}

	console.log( "RESULTS: " + JSON.stringify( entries ) );
});

This results in:


travisdepuy@appletree:~/the-badger$ node
> 
> 
> const Logging = require( '@google-cloud/logging' );
undefined
> const logging = new Logging();
undefined
> 
> 
> var theLogFilter = 'jsonPayload.resource.name=INSTANCE_NAME';
undefined
> 
> var metadata;
undefined
> 
> logging.getEntries({
...   filter: theLogFilter
... }, (err, entries, nextQuery, apiResponse) => {
... 
... 	if( err ) {
... 		console.log( "ERROR: " + err );
... 		return;
... 	}
... 
... 	console.log( "RESULTS: " + JSON.stringify( entries ) );
... });
undefined
> 
> 
> 
> 
> 
> ERROR: Error: Insufficient tokens for quota 'logging.googleapis.com/read_requests' and limit 'ReadRequestsPerMinutePerProject' of service 'logging.googleapis.com' for consumer 'project_number:1234567890123'.

> 

I've tried waiting a couple of days and it still seems to happen. Does this happen for anyone else?

Metadata

Metadata

Labels

api: loggingIssues related to the googleapis/nodejs-logging API.type: 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