backendError / 503 Error

3,065 views
Skip to first unread message

chrisb

unread,
May 25, 2012, 6:09:04 AM5/25/12
to google-analytics...@googlegroups.com
We are seeing the following when using v3 of the Core Reporting API:

{"error":{"errors":[{"domain":"global","reason":"backendError","message":"Backend Error"}],"code":503,"message":"Backend Error"}}

For example with the following feed:

ids=ga:XXXXXX&dimensions=ga:campaign,ga:keyword,ga:adGroup,ga:adDistributionNetwork,ga:adMatchType,ga:date,ga:source&metrics=ga:visits,ga:impressions,ga:adClicks,ga:adCost,ga:costPerConversion,ga:searchUniques,ga:searchExits,ga:transactions,ga:searchResultViews&filters=ga:medium==cpc;ga:source==google&start-date=2012-01-02&end-date=2012-01-02&max-results=10000

I have seen a couple of other posts regarding this, apparently acknowledging it as an issue but no follow up on whether it has been resolved.

Would appreciate some advice on how we can get round this.

Mathieu Hanna

unread,
May 29, 2012, 10:04:18 AM5/29/12
to google-analytics...@googlegroups.com
We also get this error and it's quite hard to nail down since it occurs for different API calls for no apparent reasons ..

I have just migrated from v2.3 to v2.4 and didn't have this behavior before.

chrisb

unread,
May 29, 2012, 10:26:28 AM5/29/12
to google-analytics...@googlegroups.com
Yes - we have the same, sometimes the same call works, sometimes not...

Could we please get some input from the Google Analytics team here? :)
Message has been deleted
Message has been deleted
Message has been deleted

Jan Lolling

unread,
Jun 1, 2012, 4:15:51 AM6/1/12
to google-analytics...@googlegroups.com
I have the same problem (yesterday evening it has worked but today I get this error message). I have two different accounts and one account works well and the other is not available. Probably because of my colleage is exporting data too at the same time.

My solution was to remove the ga:exits metric and now it works. The miracle is, this metric caused yesterday no problems.

Nick

unread,
Jun 1, 2012, 12:28:12 PM6/1/12
to google-analytics...@googlegroups.com
Hi,

Can you guys share the exact query you are making, including profile ID?

It could be that the account has lots of data, and your request is taking too long to compute.

-Nick

chrisb

unread,
Jun 1, 2012, 12:34:21 PM6/1/12
to google-analytics...@googlegroups.com
Hi Nick,

Our exact query is in the original post, I guess i need to check if I can post the profile ID here.

We also tried reducing the max-results as the requests were sometimes taking between 7 and 12 seconds, but even reducing the amount of data returned didn't make a difference.

My understanding is the situation has improved but I would need to confirm if it has been resolved - has something been changed at the GA API end in the past days?

Nick

unread,
Jun 1, 2012, 12:38:43 PM6/1/12
to google-analytics...@googlegroups.com
No nothing has changed in our API except what has been published in our changelogs.

Though there have been quite a few back-end changes, that are service-wide and outside the scope of our API, and one of them might have effected your query.

503 is a backend error, so it probably has to do with something specific to the processing of that profile. Without the ID we won't be able to look any further.

-Nick

chrisb

unread,
Jun 1, 2012, 2:29:46 PM6/1/12
to google-analytics...@googlegroups.com
Hi Nick - Can I email you the profile ID?

Thanks,

Chris

Nick

unread,
Jun 1, 2012, 2:50:58 PM6/1/12
to google-analytics...@googlegroups.com
sure

Mathieu Hanna

unread,
Jun 1, 2012, 3:55:25 PM6/1/12
to google-analytics...@googlegroups.com
Hi Nick, perhaps that might be helpful. Got a (500) Internal Error on this call. I usually get a (503) GDatabackendErrorBackend Error though and not necessarily on this specific call. I'm using the API v2.4.

[v] => 2
[ids] => ga:26312697
[metrics] => ga:percentNewVisits
[sort] => ga:percentNewVisits
[segment] => dynamic%3A%3Aga%3ApagePath%3D%7E%5E%2Fview%2Ffr_CA%2Fca%2Fsecteurs%2Fservicesfinanciers%2Fgestiondesplacements%2F.%2A
[start-date] => 2011-08-01
[end-date] => 2011-08-31
[start-index] => 1
[max-results] => 30
[prettyprint] => false

Thanks!

sure
--
You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-analytics-data-export-api/-/1a9oUv4v4-YJ.

To post to this group, send email to google-analytics...@googlegroups.com.
To unsubscribe from this group, send email to google-analytics-data-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-analytics-data-export-api?hl=en.

chrisb

unread,
Jun 2, 2012, 10:24:19 AM6/2/12
to google-analytics...@googlegroups.com

Great - Just emailed it to you.

Mathieu Hanna

unread,
Jun 5, 2012, 1:48:31 PM6/5/12
to google-analytics...@googlegroups.com
So I just rerun some tests and this issue is indeed only present in the version 2.4 (and v3.0 according to the OP). No 50x Errors with v2.3 of the API.

Luis

unread,
Jun 6, 2012, 5:40:18 AM6/6/12
to google-analytics...@googlegroups.com
We are also getting this error randomly since we upgraded to v3 for several profiles

joelkeepup

unread,
Jun 12, 2012, 5:18:18 PM6/12/12
to google-analytics...@googlegroups.com
us also on 2.4 a few a night

Nick

unread,
Jun 14, 2012, 12:29:32 PM6/14/12
to google-analytics...@googlegroups.com
Hi,

We wrote a document on how to handle core reporting API errors: https://developers.google.com/analytics/devguides/reporting/core/v3/coreErrors

The doc above describes some strategies on what to do when you encounter various errors. Because the nature of the internet and web services, your production application should expect to encounter API / Service errors, and have fault tolerance built in.

Thanks,
-Nick

On Friday, May 25, 2012 3:09:04 AM UTC-7, chrisb wrote:

chrisb

unread,
Jun 15, 2012, 3:54:18 AM6/15/12
to google-analytics...@googlegroups.com
Hi Nick,

Understood of course that we need to expect and deal with errors.

We have found however that the 503 error only happens sometimes (for a given feed url) - so sometimes we are able to get the data we need. However, the doc suggests:

"Do not retry this query more than once."

Which means we shouldn't even try the request again later (even though there is a good chance it will work)?

Thanks,

Chris

Nick

unread,
Jun 18, 2012, 12:55:22 PM6/18/12
to google-analytics...@googlegroups.com
Hi Chris,

Correct. You should only retry this query once.

Because the API provides access to data not available through the UI, for large accounts, or queries that have high cardinality, like city, keyword, and hour, GA might experience timeout issues. And even if you retry, the query just might fail.

If you get a lot of 503s, then you should try to revise / simplify your query.

-Nick
Reply all
Reply to author
Forward
0 new messages