gpt4 book ai didi

google-app-engine - 启用计费的 Google App Engine 应用的 OverQuotaException

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

今天早些时候,我的 Google App Engine 应用程序中的服务调用停止工作,并返回以下错误:

500 服务器错误

错误:服务器错误

服务器遇到错误,无法完成您的请求。

如果问题仍然存在,请report您的问题并提及此错误消息和导致它的查询。

HTML代码:

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>500 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>If the problem persists, please <A HREF="http://code.google.com/appengine/community.html">report</A> your problem and mention this error message and the query that caused it.</h2>
<h2></h2>
</body></html>

我检查了 GAE system status发现Memcache状态为“investigating”。当天晚些时候,所有系统状态都正常,但我现在从服务调用中收到 OverQuotaException:

Uncaught exception from servlet
com.google.apphosting.api.ApiProxy$OverQuotaException: The API call datastore_v3.Put() required more quota than is available.
at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:491)
at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:392)
at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:781)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.rpcFinished(RpcStub.java:823)
at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.success(RpcStub.java:808)
at com.google.net.rpc3.impl.client.RpcClientInternalContext.runCallbacks(RpcClientInternalContext.java:902)
at com.google.net.rpc3.impl.client.RpcClientInternalContext.finishRpcAndNotifyApp(RpcClientInternalContext.java:807)
at com.google.net.rpc3.impl.client.RpcNetChannel.afterFinishingActiveRpc(RpcNetChannel.java:1110)
at com.google.net.rpc3.impl.client.RpcNetChannel.finishRpc(RpcNetChannel.java:950)
at com.google.net.rpc3.impl.client.RpcNetChannel.handleResponse(RpcNetChannel.java:2335)
at com.google.net.rpc3.impl.client.RpcNetChannel.messageReceived(RpcNetChannel.java:2137)
at com.google.net.rpc3.impl.client.RpcNetChannel.access$2100(RpcNetChannel.java:150)
at com.google.net.rpc3.impl.client.RpcNetChannel$TransportCallback.receivedMessage(RpcNetChannel.java:3214)
at com.google.net.rpc3.impl.client.RpcChannelTransportData$TransportCallback.receivedMessage(RpcChannelTransportData.java:614)
at com.google.net.rpc3.impl.wire.RpcBaseTransport.receivedMessage(RpcBaseTransport.java:405)
at com.google.apphosting.runtime.udrpc.UdrpcTransport$ClientAdapter.receivedMessage(UdrpcTransport.java:425)
at com.google.apphosting.runtime.udrpc.UdrpcTransport.dispatchPacket(UdrpcTransport.java:266)
at com.google.apphosting.runtime.udrpc.UdrpcTransport.readPackets(UdrpcTransport.java:218)
at com.google.apphosting.runtime.udrpc.UdrpcTransport$1.run(UdrpcTransport.java:82)
at com.google.net.eventmanager.AbstractFutureTask$Sync.innerRun(AbstractFutureTask.java:260)
at com.google.net.eventmanager.AbstractFutureTask.run(AbstractFutureTask.java:121)
at com.google.net.eventmanager.EventManagerImpl.runTask(EventManagerImpl.java:578)
at com.google.net.eventmanager.EventManagerImpl.internalRunWorkerLoop(EventManagerImpl.java:1002)
at com.google.net.eventmanager.EventManagerImpl.runWorkerLoop(EventManagerImpl.java:884)
at com.google.net.eventmanager.WorkerThreadInfo.runWorkerLoop(WorkerThreadInfo.java:136)
at com.google.net.eventmanager.EventManagerImpl$WorkerThread.run(EventManagerImpl.java:1855)

在 GAE 仪表板中的配额详细信息下,所有资源都在配额之下,并且在费率列中显示“正常”。我也在应用程序上启用了计费,即使它超过了配额我也不应该收到这个错误。这里有什么问题?我什至没有在此服务调用中调用 Put() 方法。我只是查询数据。

更新:由于我的配额的下一次重置接近尾声,剩余时间为 0 小时(可能是太平洋时间 20 分钟后的午夜),仍然没有实际超过任何配额,我确实得到了这个新的错误:

503 超配额

错误

Over Quota

This application is temporarily over its serving quota. Please try again later.

HTML代码:

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>503 Over Quota</title>
<style><!--
body {font-family: arial,sans-serif}
div.nav {margin-top: 1ex}
div.nav A {font-size: 10pt; font-family: arial,sans-serif}
span.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight: bold}
div.nav A,span.big {font-size: 12pt; color: #0000cc}
div.nav A {font-size: 10pt; color: black}
A.l:link {color: #6f6f6f}
A.u:link {color: green}
//--></style>

</head>
<body text=#000000 bgcolor=#ffffff>
<table border=0 cellpadding=2 cellspacing=0 width=100%>
<tr><td bgcolor=#3366cc><font face=arial,sans-serif color=#ffffff><b>Error</b></td></tr>
<tr><td>&nbsp;</td></tr></table>
<blockquote>
<H1>Over Quota</H1>
This application is temporarily over its serving quota. Please try again later.

<p>
</blockquote>
<table width=100% cellpadding=0 cellspacing=0><tr><td bgcolor=#3366cc><img alt="" width=1 height=4></td></tr></table>
</body></html>

现在,当我在应用程序中执行任何操作时都会出现此错误,对话框中会弹出 HTML 代码。

更新 2:我的配额刚刚重置,我的应用程序再次正常运行。但这并没有回答我为什么首先会发生这种情况的问题。幸运的是,我仍在开发该应用程序,而且我是唯一一个因服务器故障而感到不便的人。在这些情况下我该怎么做才能让我的服务器恢复在线?这是普遍现象吗?如果服务器抛出错误并且我的应用程序无法运行,是否有某种方式可以接收电子邮件通知?显然等待 24 小时让服务器重置不是一个有效的解决方案。

最佳答案

我猜你的应用程序可能是这样设计的,如果它的初始内存缓存查询失败,那么它会一遍又一遍地访问数据存储。或者未能在 memcache 中设置一个值,它永远不会再尝试,假设它在那里。为什么在我不知道的日志中没有显示(您正在查看扩展的配额日志,而不是摘要,对吧?)

他们建议您设计故障点,这样如果例如数据存储不可用,您的应用不会崩溃,而是会向用户返回一条合理的消息。同样的后端 - 它们应该 24/7 全天候运行,但您仍然必须构建关闭代码以防实例需要关闭(并且您会提前被告知!)。

我怀疑您的问题(为什么会发生这种情况)在当前形式下是否可以回答。

关于google-app-engine - 启用计费的 Google App Engine 应用的 OverQuotaException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15237151/

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