"The document has moved"

2,044 views
Skip to first unread message

MT

unread,
Mar 10, 2011, 1:37:58 AM3/10/11
to google-analytic...@googlegroups.com
The behaviour of the management feed has suddenly changed dramatically: it's now much faster, but also randomly returns this:

<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
</BODY></HTML>

or the "Insufficient quota to proceed" error, even though I'm limiting the application to four concurrent queries. I'm attempting to fetch all profiles for one account at a time, so format of my queries is:

"https://www.google.com/analytics/feeds/datasources/ga/accounts/" & accountID & "/webproperties/~all/profiles"

jonah honeyman

unread,
Mar 10, 2011, 9:54:34 AM3/10/11
to google-analytic...@googlegroups.com
I have been getting only this response (the 302 redirect) for the past day on my local machine. I just tried from a remote machine and I was able to get a proper response. I am able to hit the Account feed, but not the Web Property or Profile feeds.

I'm really scratching my head here and would love it if anyone could shed some light on what's going on.

Nick

unread,
Mar 10, 2011, 1:03:53 PM3/10/11
to google-analytic...@googlegroups.com
Hi,

This is strange. Can you give us some more details on how you are accessing the feed?
- Which client library are you using?
- Which URls are being sent over the wire?
- 503 and 302 are quite different. Is there any pattern on when you are seeing this?


-Nick

Clodagh Kelly

unread,
Mar 10, 2011, 1:36:08 PM3/10/11
to google-analytic...@googlegroups.com
Hi NIck, 
We are also seeing this problem, in the management API. 

The details/debug info is as follows:
  • 302s are being seen on the webproperties and profiles feeds within the Management API. 
  • This is happening consistently for every request since yesterday AM (GMT)
  • We're using the Garb ruby gem and I've patched it to output the URI it's accessing:

irb(main):013:0*   Garb::Management::Profile.all
Garb::DataRequest::ClientError: "<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"http://www.google.com/analytics/maintenance.html\">here</A>.\r\n</BODY></HTML>\r\n"
        from /Users/steve/code/ruby/garb/lib/garb/data_request.rb:27:in `send_request'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:22:in `response'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:13:in `parsed_response'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:18:in `entries'
        from /Users/steve/code/ruby/garb/lib/garb/management/profile.rb:12:in `all'
        from (irb):13
        from :0
irb(main):014:0> Garb::Management::WebProperty.all
Garb::DataRequest::ClientError: "<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"http://www.google.com/analytics/maintenance.html\">here</A>.\r\n</BODY></HTML>\r\n"
        from /Users/steve/code/ruby/garb/lib/garb/data_request.rb:27:in `send_request'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:22:in `response'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:13:in `parsed_response'
        from /Users/steve/code/ruby/garb/lib/garb/management/feed.rb:18:in `entries'
        from /Users/steve/code/ruby/garb/lib/garb/management/web_property.rb:9:in `all'
        from (irb):14
        from :0

Let me know if you need any more info. 

Cheers, 
Clodagh (iQ Content)

jonah honeyman

unread,
Mar 10, 2011, 2:56:35 PM3/10/11
to google-analytic...@googlegroups.com
Nick,

I was using the Garb gem as well. I tried making the requests with oauth, and then with email/password. I then tried making requests directly from the ruby oauth library, and then directly from Net::HTTP. I tried this in different ruby versions as well.

When those failed I made the same requests with curl. Same results. I can hit https://www.google.com/analytics/feeds/datasources/ga/accounts, but not the webproperties or profiles feeds URLs.

-jonah

MT

unread,
Mar 10, 2011, 3:17:40 PM3/10/11
to google-analytic...@googlegroups.com
In curl, I got it working after adding:

curl_setopt($s, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($s, CURLOPT_MAXREDIRS, 10);

Otherwise, I'm making queries from VBA using MSXML2, there it works when I repeat the query enough times.

-Mikael

jonah honeyman

unread,
Mar 10, 2011, 3:45:02 PM3/10/11
to google-analytic...@googlegroups.com
Hrm. I am using curl from the command line like so:

    curl $URL -L --max-redirs 10 -H "Authorization: GoogleLogin auth=$AUTH_TOKEN"

I think that mirrors your settings. It makes the request and then just follows the redirect to the maintenance page (as one may expect). Gah this is annoying.

adrien

unread,
Mar 11, 2011, 4:37:32 AM3/11/11
to google-analytic...@googlegroups.com
+1
I've got exactly the same problem (using Garb too...)

MT

unread,
Mar 11, 2011, 4:41:59 AM3/11/11
to google-analytic...@googlegroups.com
Yeah it doesn't work for me either anymore..

adrien

unread,
Mar 11, 2011, 8:00:56 AM3/11/11
to google-analytic...@googlegroups.com
For me: back to normal, it works again !

Alexander Ivanov

unread,
Mar 11, 2011, 8:18:28 AM3/11/11
to google-analytic...@googlegroups.com
Same here. Garb is working now.

jonah honeyman

unread,
Mar 11, 2011, 8:46:46 AM3/11/11
to google-analytic...@googlegroups.com, Alexander Ivanov
Confirmed.

It would still be nice if we can get some understanding of why this was happening. Could it be some kind of geo-location issue? Perhaps Google routes requests to different servers based on IP location? That would make sense based on the few factors that I have seen:

* I am located outside of the US
* I had no problems using the management API from a server based in the US
* Around the same time the problem started happening locally, I received a single error report from a production server in the States that was being redirected to the maintenance page

My very uneducated guess is that the management API went down briefly for maintenance, but the servers fielding requests from certain locations were never brought back online until now.

Does that make sense?

-jonah

Nick

unread,
Mar 14, 2011, 1:04:13 AM3/14/11
to google-analytic...@googlegroups.com, Alexander Ivanov
Hi,

Thats great it's working for you. We're still trying to figure out what the issue is.

Thanks for your patience,
-Nick

Nick

unread,
Mar 15, 2011, 1:35:03 PM3/15/11
to google-analytic...@googlegroups.com, Alexander Ivanov
Hey Guys,

So our servers in Europe had some issues causing problems with certain feeds in the Management API. As we continue to refine the Management API, we will work to give you better status notifications. We apologize for that.

Also we found a bug which returned the incorrect status code of some mal-formed queries. In some cases incorrect queries are returning 302 status codes instead of 500s. This caused the response to change, which caused some issues. This bug has been around for a while, and will be fixed really soon.

Thanks for your patience.
-Nick
Reply all
Reply to author
Forward
0 new messages