Controlling Timeout Errors

37 views
Skip to first unread message

Spanishgringo

unread,
Aug 18, 2009, 5:08:53 AM8/18/09
to Google Data Protocol

I keep getting timeout errors. I have set the timeout parameters
which are inherited from the Service class but it does not appear to
be respecting the timeout settings because the error is happing in
less than 10 seconds.

as = new AnalyticsService("gaExportAPI_acctSample_v1.0");
as.setConnectTimeout(30000);
as.setReadTimeout(30000);


Stack trace:
Network error trying to retrieve feed: http method GET against URL
https://www.google.com/analytics/feeds/data?start-index=1&max-results...
timed out.
java.io.IOException: http method GET against URL
https://www.google.com/analytics/feeds/data?start-index=1&max-results...
timed out.
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.handleApplicationExce
ption
(URLFetchServiceImpl.java:56)
at
com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch
(URLFetchServiceImpl.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.checkResponse
(HttpGDataRequest.java:535)
at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:515)
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:128)
at gaexport.GAExportServlet.doPost(GAExportServlet.java:101)
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
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:124)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter
(ServletHandler.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
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at
com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.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)

Spanishgringo

unread,
Aug 18, 2009, 9:09:48 AM8/18/09
to Google Data Protocol
Upon further research this looks like it is caused by the 5 second
limit of the URLFetch service in App Engine. Someone on the GData
team should coordinate with the App Engine team on a solution for
requests that take longer than 5 seconds (sometimes much longer)...

On Aug 18, 11:08 am, Spanishgringo <freeman...@gmail.com> wrote:
> I keep getting timeout errors.  I have set the timeout parameters
> which are inherited from the Service class but it does not appear to
> be respecting the timeout settings because the error is happing in
> less than 10 seconds.
>
>             as = new AnalyticsService("gaExportAPI_acctSample_v1.0");
>             as.setConnectTimeout(30000);
>             as.setReadTimeout(30000);
>
> Stack trace:
> Network error trying to retrieve feed: http method GET against URLhttps://www.google.com/analytics/feeds/data?start-index=1&max-results...
> timed out.
> java.io.IOException: http method GET against URLhttps://www.google.com/analytics/feeds/data?start-index=1&max-results...
Reply all
Reply to author
Forward
0 new messages