title: OverQuotaException for billing enabled Google App Engine app
body: <p>Earlier today a service call in my Google App Engine app stopped working, returning the following error:</p>
  
  <p>
  
  500 Server Error
  
  </p>
  
  <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" rel="noreferrer">report</A> your problem and mention this error message and the query that caused it.</h2>
  
  <h2></h2>
  
  <p></p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html;charset=utf-8"&gt;
  &lt;title&gt;500 Server Error&lt;/title&gt;
  &lt;/head&gt;
  &lt;body text=#000000 bgcolor=#ffffff&gt;
  &lt;h1&gt;Error: Server Error&lt;/h1&gt;
  &lt;h2&gt;The server encountered an error and could not complete your request.&lt;p&gt;If the problem persists, please &lt;A HREF="http://code.google.com/appengine/community.html"&gt;report&lt;/A&gt; your problem and mention this error message and the query that caused it.&lt;/h2&gt;
  &lt;h2&gt;&lt;/h2&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>I checked the <a href="https://code.google.com/status/appengine/" rel="noreferrer">GAE system status</a> and found Memcache had the status of "investigating". Now later in the day, all system statuses are normal, but I'm getting an <code>OverQuotaException</code> from my service call now:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Under Quota Details in the GAE dashboard all of the resources are under quota, with "Okay" in the rate column. I have billing enabled on the app as well, even if it were over quota I shouldn't be receiving this error. What is the problem here? I'm not even calling a <code>Put()</code> method in this service call. I'm only querying data.</p>
  
  <p><strong>UPDATE:</strong> As the next reset of my quotas is drawing close with 0 hours remaining (probably midnight pacific time in 20 minutes), still no actual exceeding of any quota either, I do get this new error:</p>
  
  <p>
  
  503 Over Quota
  </p>
  
  <p>
  </p>
  
  
  <b>Error</b>
  &nbsp;
  
  <blockquote>
  <H1>Over Quota</H1>
  This application is temporarily over its serving quota.  Please try again later.
  
  <p>
  </blockquote>
  
  
  
  <p></p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html;charset=utf-8"&gt;
  &lt;title&gt;503 Over Quota&lt;/title&gt;
  &lt;style&gt;&lt;!--
  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}
  //--&gt;&lt;/style&gt;
  
  &lt;/head&gt;
  &lt;body text=#000000 bgcolor=#ffffff&gt;
  &lt;table border=0 cellpadding=2 cellspacing=0 width=100%&gt;
  &lt;tr&gt;&lt;td bgcolor=#3366cc&gt;&lt;font face=arial,sans-serif color=#ffffff&gt;&lt;b&gt;Error&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;blockquote&gt;
  &lt;H1&gt;Over Quota&lt;/H1&gt;
  This application is temporarily over its serving quota.  Please try again later.
  
  &lt;p&gt;
  &lt;/blockquote&gt;
  &lt;table width=100% cellpadding=0 cellspacing=0&gt;&lt;tr&gt;&lt;td bgcolor=#3366cc&gt;&lt;img alt="" width=1 height=4&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>This error now comes up when I do anything in the app, the HTML code popping up in a dialog box.</p>
  
  <p><strong>UPDATE 2:</strong> My quota just reset and my app is functioning normally again. But this doesn't answer my question as to why this occurred in the first place. Luckily I am still developing the app and I was the only one inconvenienced by this server glitch. What am I to do in these situations to get my server back online? Is this a common occurrence? Is there some way to receive an email notification if the server is throwing errors and my app is not functioning? Obviously waiting 24 hours for the server to reset is not a valid solution.</p>