【问题标题】:OverQuotaException for billing enabled Google App Engine app启用计费的 Google App Engine 应用的 OverQuotaException
【发布时间】:2013-03-06 01:04:13
【问题描述】:

今天早些时候,我的 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 的状态为“正在调查”。现在晚些时候,所有系统状态都正常,但我现在从我的服务电话中收到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 仪表板中的配额详细信息下,所有资源都在配额之下,速率列中显示“Okay”。我也在应用程序上启用了计费,即使它超过了配额,我也不应该收到此错误。这里有什么问题?我什至没有在此服务调用中调用Put() 方法。我只是在查询数据。

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

503超额

错误

超出配额

此应用程序暂时超出其服务配额。请稍后再试。

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 小时让服务器重置不是一个有效的解决方案。

【问题讨论】:

  • 错误信息的来源真的不用写了,通用的。
  • 我只包含了源代码,主要是为了让其他收到相同错误的人能够找到它。由于问题中不允许使用完整的 HTML 代码,因此它会保留收到的完整错误。此外,它不断变化,我无法恢复以前的错误,它们被保存了。
  • 你说的是真的..Obviously waiting 24 hours for the server to reset is not a valid solution.

标签: google-app-engine


【解决方案1】:

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

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

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

【讨论】:

  • 我在看appengine.google.com/dashboard/quotadetails。如果这不是它们,我不知道您所指的扩展日志在哪里。另外,请说明启用了计费功能的应用程序如何超出配额。计费的目的是对超出配额的任何资源进行收费。
  • 是的,就是这样。而不是您在仪表板下看到的那个。我了解付费应用程序仍有可能超出配额,因为系统中有一些“安全”限制(每秒限制等无法覆盖)。但 TBH 我并没有考虑在那里启用计费。
猜你喜欢
  • 1970-01-01
  • 2012-07-24
  • 1970-01-01
  • 2015-08-26
  • 2011-03-24
  • 2012-01-09
  • 1970-01-01
  • 2017-12-30
  • 1970-01-01
相关资源
最近更新 更多