gpt4 book ai didi

google-app-engine - TransientFailureException --> 从拉入队列中租用任务时

转载 作者:太空宇宙 更新时间:2023-11-03 15:33:00 24 4
gpt4 key购买 nike

我们在我们的场景中使用带后端的拉队列,我们​​的后端尝试在一些固定的时间间隔后从我们的拉队列中租用任务,如果没有任务,它不做任何事情,如果有任务,那些是处理 。昨天我们在我们的系统中得到了这个 TransientFailureException,这正是我的 servlet 试图从拉入队列中租用任务时发生的。异常不断出现,直到我们停止后端。

我们的代码片段——

{
Boolean leasedTaskFromFastQueue = true;
Queue fastQueue = QueueFactory.getQueue("FastQueue");
Queue slowQueue = QueueFactory.getQueue("SlowQueue");

List<TaskHandle> tasks = fastQueue.leaseTasks(
3600, TimeUnit.SECONDS, 1);

TaskHandle taskHandle = null;

if(tasks.size() > 0) {

taskHandle = tasks.get(0);

}
}

我们在从 fastQueue 租用任务的线路上遇到错误,这是一个拉队列

<queue>
<name>FastQueue</name>
<mode>pull</mode>

</queue>

我也粘贴了我的错误跟踪,以防有帮助

com.google.appengine.api.taskqueue.TransientFailureException:
at com.google.appengine.api.taskqueue.QueueApiHelper.translateError(QueueApiHelper.java:79)
at com.google.appengine.api.taskqueue.QueueApiHelper.translateError(QueueApiHelper.java:139)
at com.google.appengine.api.taskqueue.QueueApiHelper.makeSyncCall(QueueApiHelper.java:53)
at com.google.appengine.api.taskqueue.QueueImpl.leaseTasksInternal(QueueImpl.java:709)
at com.google.appengine.api.taskqueue.QueueImpl.leaseTasks(QueueImpl.java:731)
at com.implementhit.advancedsupport.server.queue.Backend.doGet(Backend.java:50)
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.bitdual.appengine.tools.datastore.server.NamespaceFilter.doFilter(NamespaceFilter.java:96)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:102)
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$RequestRunnable.run(JavaRuntime.java:477)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)

最佳答案

它也发生在我们身上,TransientFailureException 是一个内部错误,据我们所知,它与我们的代码无关。如果连续发生 50 个错误,我们最终会自动重启后端。

关于google-app-engine - TransientFailureException --> 从拉入队列中租用任务时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11322481/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com