SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Network Timeout in Google Analytics using GData #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create query (using Query or URL) with large data set such as:
URL: https://www.google.com/analytics/feeds/data?start-index=1&max-
results=10000&ids=ga%3A9265685&dimensions=ga%3AlandingPagePath&metrics=ga%3
Aentrances%2Cga%3Abounces&sort=-
ga%3Aentrances&filters=ga%3Amedium%3D%3Dorganic&start-date=2009-05-01&end-
date=2009-05-31
2. use a new AnalyticsService to getFeed:
AnalyticsService as = new AnalyticsService("gaExportAPI_acctSample_v1.0");
/* more code here to auth etc... */
URL url = query.getUrl();
DataFeed feed = as.getFeed(url, DataFeed.class);

What is the expected output? What do you see instead?
Expected: receive the atom feed for processing.
Actual Result: IOException thrown from getFeed() with Network Timeout 
Error:
Network error trying to retrieve feed: http method GET against URL 
https://www.google.com/analytics/feeds/data?start-index=1&max-
results=10000&ids=ga%3A9265685&dimensions=ga%3AlandingPagePath&metrics=ga%3
Aentrances%2Cga%3Abounces&sort=-
ga%3Aentrances&filters=ga%3Amedium%3D%3Dorganic&start-date=2009-05-01&end-
date=2009-05-10 timed out.
java.io.IOException: http method GET against URL 
https://www.google.com/analytics/feeds/data?start-index=1&max-
results=10000&ids=ga%3A9265685&dimensions=ga%3AlandingPagePath&metrics=ga%3
Aentrances%2Cga%3Abounces&sort=-
ga%3Aentrances&filters=ga%3Amedium%3D%3Dorganic&start-date=2009-05-01&end-
date=2009-05-10 timed out.
    at 
com.google.appengine.api.urlfetch.URLFetchServiceImpl.handleApplicationExce
ption(URLFetchServiceImpl.java:56)
    at 
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchService
Impl.java:30)
    at 
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$
Connection.fetchResponse(URLFetchServiceStreamHandler.java:389)
    at 
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$
Connection.getInputStream(URLFetchServiceStreamHandler.java:289)
    at 
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$
Connection.getResponseCode(URLFetchServiceStreamHandler.java:131)
    at 
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java
:504)
    at 
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.
java:515)
    at com.google.gdata.client.Service.getFeed(Service.java:1053)
    at com.google.gdata.client.Service.getFeed(Service.java:916)
    at 
com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)
    at com.google.gdata.client.Service.getFeed(Service.java:935)
    at 
gaexport.GAExportServlet.getPageResults(GAExportServlet.java:144)
    at gaexport.GAExportServlet.doPost(GAExportServlet.java:116)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
    at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1093)
    at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans
actionCleanupFilter.java:43)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile
Filter.java:124)
    at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandle
r.java:1084)
    at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
    at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at 
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn
gineWebAppContext.java:54)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at 
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandle
r.handle(JettyContainerService.java:313)
    at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:313)
    at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
    at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java
:844)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
    at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396
)
    at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:
442)

What version of the product are you using? On what operating system?
Win XP
JRE 1.6.0_13
AppEngine 1.2.2

Please provide any additional information below.
Sometimes the query works if I am debugging and I let it sit for awhile 
before continuing.  It seems perhaps that this sometimes gives Google 
Analytics enough time to calculate the data in order to send back a 
response.

Using as.setConnectTimeout() and as.setReadTimeout() does not seem to have 
any effect on avoiding this error.

Please advise

Original issue reported on code.google.com by freeman...@gmail.com on 18 Aug 2009 at 10:14

GoogleCodeExporter commented 9 years ago
This sounds like a server-side timeout.  Please repost this issue in
http://groups.google.com/group/google-analytics-api, will have a better chance 
of
getting response from other analytics API users or engineering team.

This forum is not actively monitored for service specific issues.

Original comment by vbarat...@gmail.com on 24 Aug 2009 at 6:12