User-rate limit exceeded 429 on specific domain - gmail-api

We are getting this error on the one domain we are accessing, with Java:
429 unknown
{
"code" : 429,
"errors" : [ {
"domain" : "usageLimits",
"message" : "User-rate limit exceeded. Retry after 2015-05-21T16:36:01.691Z",
"reason" : "rateLimitExceeded"
} ],
"message" : "User-rate limit exceeded. Retry after 2015-05-21T16:36:01.691Z"
}
We are pretty sure that we are not exceeding the User-rate limit (250 quotas) for that system. We are only doing read requests, which should count about 5 quotas each. We would expect a maximum quota usage from 150 quotas per second with what we do.
We are using an oauth2 service account to access user mailboxes.
If it occurs we are waiting for the "Retry after" date. But we are immediately getting the "User-rate limit exceeded" right after that date.
This domain is in argentinia. While when we run the code against another domain in the US, we are NEVER getting this error.

Related

I got this error while deploying on Kadena mainnet

Error HTTP response (Status {statusCode = 400, statusMessage = ""}):"Validation failed for hash "-bcsjpIuk6BpfuynRHeQsXRvxYP7BtizDeeZVt-8e44": Attempt to buy gas failed with: : Failure: Tx Failed: Account name does not conform to the min length requirement: "
You can't leave the "sender" field blank. The "sender" field tells Kadena chainweb which coin account is being used to pay gas. It should be an account with some funds on the chain where you are deploying on.
It's recommended to test deployments on testnet. Use the faucet to obtain some test kda.

Error on send email endpoint. Precondition check failed

I have got an application up and running, and sending emails using the API with no problem at all. But for specific customers, I am getting the following error and I cannot manage to reproduce it. Could you give me further details about the problem? It works for most of my customers
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Precondition check failed.",
"reason" : "failedPrecondition"
} ],
"message" : "Precondition check failed.",
"status" : "FAILED_PRECONDITION"
}
I am using the Java Client library from Google, and this is how my code looks I followed the Google guides:
MimeMessage content = emailService.createEmail(sendEmailRequest);
Message message = createMessageWithEmail(content);
gmail.users().messages().send(ME, message).execute();
The path that the client is hitting is this one {userId}/messages/send and these are the scopes the application asks:
openid email https://www.googleapis.com/auth/gmail.send
Thanks in advance

What is the maximum limit of Google Pub/Sub Attributes value?

I'm trying to use Google Pub/Sub in my project.
And I got error because it exceed the limit of attributes value.
Message: Client error: POST https://pubsub.googleapis.com/v1/projects/<project>/topics/<topic>:publish resulted in a 400 Bad Request response: { "error": { "code": 400, "message": "One of the attributes in the request has a value that is too long. The l (truncated...)
I read the documentation on https://cloud.google.com/pubsub/docs/ but couldn't find it.
The limits are specified in the Quotas sections of the documentation. An attribute key can be up to 256 bytes and an attribute value can be up to 1024 bytes.

Error when trying to get Google Drive File

I am getting an error when trying to get a Google Drive File using:
file = service.files().get(fileId=<googleDriveFileId>).execute()
The error is:
<HttpError 404 when requesting https://www.googleapis.com/drive/v2/files/0B6Cpn8NXwgGPQjB6ZlRjb21ZdXc?alt=json returned "File not found: 0B6Cpn8NXwgGPQjB6ZlRjb21ZdXc">
However, when I copy and paste that link directly in the browser like this:
https://www.googleapis.com/drive/v2/files/0B6Cpn8NXwgGPQjB6ZlRjb21ZdXc?alt=json
I get a different error:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit Exceeded. Please sign up",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit Exceeded. Please sign up"
}
}
I am no where even close to exceeding the daily limit, the console shows 0% usage.
I know the fileId is correct, I am using Google Picker to get the fileId.
Any ideas?
I have found elsewhere that this is known issue with Google Drive that they are working to resolve. They offer the following workaround that I have confirmed works.
Add the following to when building the picker:
enableFeature(google.picker.Feature.MULTISELECT_ENABLED).
complete code:
var picker = new google.picker.PickerBuilder().
addView(view).
addView(uploadView).
setAppId("pressomatic").
setCallback(pickerCallback).
enableFeature(google.picker.Feature.MULTISELECT_ENABLED).
build();
picker.setVisible(true);
This same workaround solves another problem I have posted about, when trying to upload to a specific folder with Google Picker using setParent on a DocsUploadView. You still add the same feature to the Picker, not the DocsUploadView, and everything works as it should.

GAE/J request log format breakdown

Here is a sample of GAE Console log record:
http://i.stack.imgur.com/M2iJX.png for readable high res version.
I would like to provide a breakdown of the fileds, displayed both in the collpased (summary) view and the expended (detail) view. I will fill the fields I know their meaning and would appreciate assistannce with dichipering the rest. This post will be updated once new information is available.
Thank you,
Maxim.
Open issues:
How to read timestamp? [...-prod/0-0-39.346862139187007139]
Why in summary it says request took 343ms but in details is says 344ms ?
If request spend 123ms on cpu and 30ms on API calls where did the rest of the time go? Why the total request time is 343/344ms ?
Summary
12-14 : Date of the request. 12 is the month (December), 14 is the day of the month (Tuesday).
05:21AM : Time of the request, PST offset. 05 is the hour. 21 is the minute.
57.593 : Time of request, PST offset. 57 is the second. 593 is the millisecond.
/match/... : HTTP request path
200 : HTTP return code. (200 = OK)
343ms : The total time (in milliseconds) it took to calculate and return the response to the user
123cpu_ms : The time (in milliseconds) the request spend on CPU calculation
30api_cpu_ms : The time (in milliseconds) the request spend on API calls (Datastore get and co...)
1kb : The size (in kilobytes) of the response that was sent to the user
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7,gzip(gfe) : User Agent note that gzip(gfe) is added by AppEngine front end.
Details
IP yellow masked out : The IP address of the client initiating the request
HTTP Referrer : Note that it's empty on this request because it's a direct hit
[14/Dec/2010:05:21:57 -0800] : Date, including timestamp offset specification.
"GET /match/... HTTP/1.1" : The HTTP GET URI.
200 : HTTP return code. (200 = OK)
1036 : The size (in bytes) of the response that was sent to the user
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7,gzip(gfe) : User Agent note that gzip(gfe) is added by AppEngine front end.
ms=344 : The total time (in milliseconds) it took to calculate and return the response to the user
cpu_ms=123 : The time (in milliseconds) the request spend on CPU calculation
api_cpu_ms=30 : The time (in milliseconds) the request spend on API calls (Datastore get and co...)
cpm_usd=0.003648 : The amount (in us $) that 1000 requests such as this one would cost. ref
log record
12-14 : Date of this specific application emitted log entry. 12 is the month (December), 14 is the day of the month (Tuesday).
05:21AM : Time of this specific application emitted log entry, PST offset.
57.833 : Time of request, PST offset. 57 is the second. 833 is the millisecond.
[...-prod/0-0-39.346862139187007139] : The identifier of current version of the application that emitted this log message. Note: ...-prod is the application name. 0-0-39 is the deployed version name (app.yaml). .346862139187007139 is the time? (in what format?) when this version was deployed to appengine cloud.
stdout : The channel to which the application emitted this log message. Can be either stdout or stderr.
INFO ....Matcher - ... Id 208 matched. : Application level output. Can be done via either System.out.print or (as in this case) using a logging framework, logback
Isn't 57.593 seconds.milliseconds?
And cpm_usd represents an estimate of what 1,000 requests similar to this request would cost in US dollars.

Resources