5

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

500 服务器错误

错误:服务器错误

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

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

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

4

1 回答 1

0

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

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

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

于 2013-03-06T09:45:28.860 回答