支持结算的OverQuotaException支持Google App Engine应用

时间:2013-03-06 01:04:14

标签: google-app-engine

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

500服务器错误

错误:服务器错误

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

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

HTML code:

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

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

503超过配额

错误

超过配额

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

HTML code:

<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小时不是一个有效的解决方案。

1 个答案:

答案 0 :(得分:0)

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

他们建议您设计失败点,因此,如果数据存储不可用,您的应用程序不会崩溃,而是会向用户返回合理的消息。同样是后端 - 它们应该全天候运行但是你仍然需要构建关闭代码,以防实例需要关闭(并且事先得到告知!)。

我怀疑你的问题(为什么会发生这种情况)然而它的当前形式是可以回答的。