(500) There was an internal error - For Most of the time

1,645 views
Skip to first unread message

Chirag

unread,
Oct 28, 2015, 8:50:43 AM10/28/15
to Google Analytics Reporting API
Hello Members,

I am getting (500) There was an internal error. For all my requests.
Please note that this is the same code working from last few months, but today suddenly getting 500 Error for all my request to google analytics API.

Can anyone please help me same?

Getting error like this 
"Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=id&start-date=2014-10-01&end-date=2015-09-30&metrics=ga%3Asessions%2Cga%3AbounceRate&dimensions=ga%3Amonth%2Cga%3Ayear&sort=ga%3Ayear%2Cga%3Amonth&start-index=1&max-results=12&key=AIzaSyC4ebHE4a9p0SnsjYX2XaGa_aI-IemiDlw: (500) There was an internal error.' in /var/www/html/version6/application/libraries/src_latest/io/apiREST.php:86 Stack trace: #0 /var/www/html/version6/application/libraries/src_latest/io/apiREST.php(56): apiREST::decodeHttpResponse(Object(apiHttpRequest)) #1 /var/www/html/version6/application/libraries/src_latest/service/apiServiceResource.php(187): apiREST::execute(Object(apiServiceRequest)) #2 /var/www/html/version6/application/libraries/ApiAnalyticsService.php(228): apiServiceResource->__call('get', Array)

Please guide me if someone can help.

Thanks,
Chirag
 

Jacob

unread,
Oct 28, 2015, 9:08:28 AM10/28/15
to Google Analytics Reporting API
+1

Tim Fisher

unread,
Oct 28, 2015, 10:37:01 AM10/28/15
to Google Analytics Reporting API
Same here! I haven't made any code changes (I'm all JS) at all and I'm getting the following on 95% of queries today:

domain: "global"
message: "There was an internal error."
reason: "internalError"

These are basic page view and session queries - nothing fancy. It's certainly not an invalid request on my part.

Tim Fisher

unread,
Oct 28, 2015, 10:40:03 AM10/28/15
to Google Analytics Reporting API
FWIW, I'm using the Embed API in a JavaScript project. Again, no code changes on my part and every so often (~5%), the requests will go through. HUGE majority failing with 500, though.

ben.b...@oxoptimal.com

unread,
Oct 28, 2015, 11:17:36 AM10/28/15
to Google Analytics Reporting API
Hey everyone,
Issue seems to be as follows:
if you are using ga:adwordsCampaignId as a filter when you are calling Analytics.Data.Ga.get, it ends up crashing.
change occurred somewhere between 3am and 6 am CT.

Some documentation suggests they are moving from from ga:adwordsampaignId to ga:campaignCode, but as of now, querying it gets nothing and still causes the internal error sometimes.


Sources:


On Wednesday, October 28, 2015 at 7:50:43 AM UTC-5, Chirag wrote:

Tim Fisher

unread,
Oct 28, 2015, 11:19:49 AM10/28/15
to Google Analytics Reporting API
Thanks Ben, but I know for me, that's not the case.

I don't use ga:adwordsCampaignId (nor any adwords related dimensions) anywhere in my project. Maybe there were some other inadvertent changes as well?

ben.b...@oxoptimal.com

unread,
Oct 28, 2015, 11:26:14 AM10/28/15
to Google Analytics Reporting API
You're probably right.
Now we wait.

Matt

unread,
Oct 28, 2015, 12:58:33 PM10/28/15
to Google Analytics Reporting API
Hello Everyone,
Just quick update. We are aware of the issue and are investigating.
I will update this thread once when I have more information.
-Matt

Matt

unread,
Oct 29, 2015, 6:11:42 PM10/29/15
to Google Analytics Reporting API
Hello Everyone,
A final update on this. Yesterday, as noted there was an unusual increase in 500s reported. 
This cause of the issue was identified and resolved midday yesterday.

As noted in the documentation a 500 or 503 error normally might result during heavy load or for larger more complex requests. For larger requests consider requesting data for a shorter time period. Also consider implementing exponential backoff. The frequency of these errors can be dependent on the view (profile) and the amount of reporting data associated with that view; A query that causes a 500 or 503 error for one view (profile) will not necessarily cause an error for the same query with a different view (profile).

We appreciate that you brought this issue to our attention.
-Matt

Tim Fisher

unread,
Oct 29, 2015, 6:31:23 PM10/29/15
to Google Analytics Reporting API
Thanks Matt! Appreciate the prompt response yesterday.

Chirag

unread,
Oct 30, 2015, 4:53:57 AM10/30/15
to Google Analytics Reporting API
Thanks Matt for quick fix.

Jacob

unread,
Oct 30, 2015, 11:50:39 AM10/30/15
to Google Analytics Reporting API
I still received an error this morning. Is 2010 too far to go back in time?  Can you provide any guidance around your definition of "larger more complex requests"? Right now I'm randomly trying different dates and the fact that it only happens sometimes to some accounts is a very frustrating experience.

Matthew Cohoon

unread,
Oct 30, 2015, 1:15:49 PM10/30/15
to Google Analytics Reporting API
Hello Jacob,
From your request it appears you are request all the information from 2010 to 2015, depending on the popularity of your blog that is potentially a good deal of data to be requesting. Perhaps try making smaller requests for individual months. As I stated above the frequency of these errors can be dependent on the view (profile) and the amount of reporting data associated with that view; A query that causes a 500 or 503 error for one view (profile) will not necessarily cause an error for the same query with a different view (profile). Just for fun you could do a binary search to find the maximum range for your particular view (profile).
-Matt


--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/_kHSSEDIqZI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob

unread,
Oct 30, 2015, 1:20:23 PM10/30/15
to Google Analytics Reporting API
Thanks Matt.  Perhaps there's a more efficient way of going about things?  I'm basically trying to run a query that gives all-time total pageview counts for a particular page path. Is the query I'm using the most efficient way to do that? I just want total pageview counts, I don't need any other data.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages