Hi Sanjith. All App Engine requests must return within 30 seconds or this
exception will be thrown. If you have a larger task, you can divide it into
several parts and execute these in separate tasks, but each task must also
return in 30 seconds or less.

- Jason

On Sat, Oct 31, 2009 at 11:12 AM, Sanjith Chungath <csanj...@gmail.com>wrote:

> in another word, is there a way to execute a server action through a normal
> server call or by tasks which can run more than 30 seconds?
>
> -Sanjith
>
>
> On Sat, Oct 31, 2009 at 12:40 AM, Sanjith Chungath <csanj...@gmail.com>wrote:
>
>> Hi all,
>>         While executing a server method which talks to another system and
>> get details from there, I get a DeadlineExceededException at the
>> appengine. I don't have much control on the time taken by the other system.
>> I just call a method from an interface of that system and wait for the
>> response. What is the best practice in these situations? Below are the
>> exceptions that I got at server.
>>
>> javax.servlet.ServletContext log: Exception while dispatching incoming RPC 
>> call
>> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
>> abstract java.lang.String 
>> com.sanchu.clicks.client.GreetingService.greetServer(java.lang.String)' 
>> threw an unexpected exception: 
>> com.google.apphosting.api.DeadlineExceededException: This request 
>> (e737f449255620d0) started at 2009/10/29 18:30:43.480 UTC and was still 
>> executing at 2009/10/29 18:31:12.207 UTC.
>>      at 
>> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
>>      at 
>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
>>      at 
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
>>      at 
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
>>      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.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
>>      at 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>>      at 
>> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
>>      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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
>>      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.headerComplete(HttpConnection.java:830)
>>      at 
>> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
>>      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>>      at 
>> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
>>      at 
>> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:239)
>>      at 
>> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5135)
>>      at 
>> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5133)
>>      at 
>> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
>>      at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:363)
>>      at com.google.net.rpc.impl.Server$2.run(Server.java:814)
>>      at 
>> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
>>      at 
>> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
>>      at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
>>      at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
>>      at 
>> com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437)
>>      at 
>> com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
>>      at 
>> com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
>>      at com.google.net.async.Connection.handleReadEvent(Connection.java:436)
>>      at 
>> com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
>>      at 
>> com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
>>      at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
>>      at 
>> com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
>>      at 
>> com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:396)
>>      at java.lang.Thread.run(Unknown Source)
>> Caused by: com.google.apphosting.api.DeadlineExceededException: This request 
>> (e737f449255620d0) started at 2009/10/29 18:30:43.480 UTC and was still 
>> executing at 2009/10/29 18:31:12.207 UTC.
>>      at sun.misc.Unsafe.park(Native Method)
>>      at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
>>      at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(Unknown
>>  Source)
>>      at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(Unknown
>>  Source)
>>      at java.util.concurrent.CountDownLatch.await(Unknown Source)
>>      at 
>> com.google.net.rpc.util.RpcWaiter.waitForRpcsToFinish(RpcWaiter.java:96)
>>      at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:79)
>>      at 
>> com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:40)
>>      at com.aetrion.flickr.REST.get(REST.java:142)
>>      at 
>> com.aetrion.flickr.photosets.PhotosetsInterface.getPhotos(PhotosetsInterface.java:435)
>>      at 
>> com.aetrion.flickr.photosets.PhotosetsInterface.getPhotos(PhotosetsInterface.java:479)
>>      at 
>> com.sanchu.clicks.flickr.FlickrQuery.getAllPhotos(FlickrQuery.java:98)
>>      at com.sanchu.clicks.datastore.LoadData.loadAllPhotos(LoadData.java:29)
>>      at 
>> com.sanchu.clicks.server.GreetingServiceImpl.greetServer(GreetingServiceImpl.java:18)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>      at java.lang.reflect.Method.invoke(Method.java:40)
>>      at 
>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
>>      ... 43 more
>>
>> -Sanjith.
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to