Hello I been experiencing a load of problems executing queries in a task queue running on a backend.
The log goes like this: Uncaught exception from servlet com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call datastore_v3.RunQuery() took too long to respond and was cancelled. at com.google.apphosting.runtime.ApiProxyImpl$3.createDeadlineException(ApiProxyImpl.java:277) at com.google.appengine.tools.development.TimedFuture.get(TimedFuture.java:44) at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:64) at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67) at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:67) at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:71) at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:32) at com.google.appengine.api.datastore.QueryResultsSourceImpl.loadMoreEntities(QueryResultsSourceImpl.java:84) at com.google.appengine.api.datastore.QueryResultIteratorImpl.ensureLoaded(QueryResultIteratorImpl.java:169) at com.google.appengine.api.datastore.QueryResultIteratorImpl.nextList(QueryResultIteratorImpl.java:115) at com.google.appengine.api.datastore.LazyList.forceResolveToIndex(LazyList.java:107) at com.google.appengine.api.datastore.LazyList.resolveToIndex(LazyList.java:83) at com.google.appengine.api.datastore.LazyList.resolveToIndex(LazyList.java:65) at com.google.appengine.api.datastore.LazyList.isEmpty(LazyList.java:296) at com.google.appengine.api.datastore.PreparedQueryImpl.asSingleEntity(PreparedQueryImpl.java:81)* at com.app.server.MyServlet.doGet(MyServlet.java:44)* at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:249) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:260) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9805) at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:422) at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:579) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:449) at com.google.tracing.TraceContext.runInContext(TraceContext.java:689) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:327) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:319) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:447) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) It points to the place in my app where a do a simple query by key like this: |41| Query qq = new Query("MyPersistentClass"); |42| qq.addFilter("__key__", Query.FilterOperator.EQUAL, |43| KeyFactory.createKey("MyPersistentClass", "validKey")); |44| Entity entity = datastore.prepare(qq).asSingleEntity(); The queue configuration in the queue.xml goes like this: <queue> <name>default</name> <target>backend</target> <rate>500/s</rate> </queue> The backend is configured as follows in the backend.xml file: <backend name="task"> <class>B1</class> <instances>1</instances> <options> <dynamic>true</dynamic> </options> </backend> This behavior is across different task queues all running on top of the same backend. It's also intermittent, the query works as intended for some time and then suddenly stops working an then comes back for all the queues at the same time. While the datastore queries are not working the backend instance shows 0% CPU usage but keeps logging messages like the previously mentioned, when I see that in the admin console I shut down the backend instance and when it turns on again everything seems to work fine at that point. I hope somebody could help. Thanks in advance! -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/PBHuBcElN6YJ. 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.