title: The request to API call datastore_v3.Put() was too large. using Objectify (DataStore) and not uploading files
body: <p>I get the following error.</p>
  
  <blockquote>
    <p>com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
    request to API call datastore_v3.Put() was too large.</p>
  </blockquote>
  
  <p>I am using Objectify 4.0 and not uploading any file. I am using the DataStore for my app, but the only item above 1Mb is a <code>_values</code> blob in <code>_ah_SESSION</code> entity.</p>
  
  <p>The images of the console are in:
  <a href="http://goo.gl/qP7v7U" rel="nofollow">http://goo.gl/qP7v7U</a></p>
  
  <p>I dont know how to troubleshoot the issue and even when the error has been asked before, my problem is that I am not using files and I am actually using the datastore. </p>
  
  <p>EDIT: Testing again, it seems to break in a Delete operation. Here's the log.</p>
  
  <blockquote>
  <pre><code>W 12:37:39.798 /editarContrato.jsf
    com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large.
      at com.google.apphosting.utils.runtime.ApiProxyUtils.convertApiError(ApiProxyUtils.java:42)
      at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:497)
      at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:411)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:856)
      at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
      at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
      at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
      at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
      at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.runCallback(RpcStub.java:894)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.rpcFinished(RpcStub.java:904)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.success(RpcStub.java:883)
      at com.google.net.rpc3.impl.client.RpcClientInternalContext.runCallbacks(RpcClientInternalContext.java:1130)
      at com.google.net.rpc3.impl.client.RpcClientInternalContext.finishRpcAndNotifyApp(RpcClientInternalContext.java:1030)
      at com.google.net.rpc3.impl.client.RpcNetChannel.afterFinishingActiveRpc(RpcNetChannel.java:1459)
      at com.google.net.rpc3.impl.client.RpcNetChannel.finishRpc(RpcNetChannel.java:1280)
      at com.google.net.rpc3.impl.client.RpcNetChannel.handleResponse(RpcNetChannel.java:2995)
      at com.google.net.rpc3.impl.client.RpcNetChannel.messageReceived(RpcNetChannel.java:2731)
      at com.google.net.rpc3.impl.client.RpcNetChannel.access$2900(RpcNetChannel.java:175)
      at com.google.net.rpc3.impl.client.RpcNetChannel$TransportCallback.receivedMessage(RpcNetChannel.java:3922)
      at com.google.net.rpc3.impl.client.RpcChannelTransportData$TransportCallback.receivedMessage(RpcChannelTransportData.java:669)
      at com.google.net.rpc3.impl.wire.RpcBaseTransport.receivedMessage(RpcBaseTransport.java:457)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport$ClientAdapter.receivedMessage(UdrpcTransport.java:577)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport.dispatchPacket(UdrpcTransport.java:386)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport.readPackets(UdrpcTransport.java:283)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport$1.run(UdrpcTransport.java:100)
      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:594)
      at com.google.net.eventmanager.EventManagerImpl.internalRunWorkerLoop(EventManagerImpl.java:1011)
      at com.google.net.eventmanager.EventManagerImpl.runWorkerLoop(EventManagerImpl.java:892)
      at com.google.net.eventmanager.WorkerThreadInfo.runWorkerLoop(WorkerThreadInfo.java:161)
      at com.google.net.eventmanager.EventManagerImpl$WorkerThread.run(EventManagerImpl.java:1879)
  F 12:37:39.801 Uncaught exception from servlet
    com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large.
      at com.google.apphosting.utils.runtime.ApiProxyUtils.convertApiError(ApiProxyUtils.java:42)
      at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:497)
      at com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.success(ApiProxyImpl.java:411)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:856)
      at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
      at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
      at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
      at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
      at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.runCallback(RpcStub.java:894)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.rpcFinished(RpcStub.java:904)
      at com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher.success(RpcStub.java:883)
      at com.google.net.rpc3.impl.client.RpcClientInternalContext.runCallbacks(RpcClientInternalContext.java:1130)
      at com.google.net.rpc3.impl.client.RpcClientInternalContext.finishRpcAndNotifyApp(RpcClientInternalContext.java:1030)
      at com.google.net.rpc3.impl.client.RpcNetChannel.afterFinishingActiveRpc(RpcNetChannel.java:1459)
      at com.google.net.rpc3.impl.client.RpcNetChannel.finishRpc(RpcNetChannel.java:1280)
      at com.google.net.rpc3.impl.client.RpcNetChannel.handleResponse(RpcNetChannel.java:2995)
      at com.google.net.rpc3.impl.client.RpcNetChannel.messageReceived(RpcNetChannel.java:2731)
      at com.google.net.rpc3.impl.client.RpcNetChannel.access$2900(RpcNetChannel.java:175)
      at com.google.net.rpc3.impl.client.RpcNetChannel$TransportCallback.receivedMessage(RpcNetChannel.java:3922)
      at com.google.net.rpc3.impl.client.RpcChannelTransportData$TransportCallback.receivedMessage(RpcChannelTransportData.java:669)
      at com.google.net.rpc3.impl.wire.RpcBaseTransport.receivedMessage(RpcBaseTransport.java:457)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport$ClientAdapter.receivedMessage(UdrpcTransport.java:577)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport.dispatchPacket(UdrpcTransport.java:386)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport.readPackets(UdrpcTransport.java:283)
      at com.google.apphosting.runtime.udrpc.UdrpcTransport$1.run(UdrpcTransport.java:100)
      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:594)
      at com.google.net.eventmanager.EventManagerImpl.internalRunWorkerLoop(EventManagerImpl.java:1011)
      at com.google.net.eventmanager.EventManagerImpl.runWorkerLoop(EventManagerImpl.java:892)
      at com.google.net.eventmanager.WorkerThreadInfo.runWorkerLoop(WorkerThreadInfo.java:161)
      at com.google.net.eventmanager.EventManagerImpl$WorkerThread.run(EventManagerImpl.java:1879)
  </code></pre>
  </blockquote>
  
  <p>Any help appreciated.</p>
  
  <p>The AppStat error stack</p>
  
  <pre><code>@2998ms datastore_v3.RunQuery real=7ms api=0ms cost=0 billed_ops=[]
  Stack:
    com.google.appengine.tools.appstats.Recorder:276 makeAsyncCall()
    com.google.apphosting.api.ApiProxy:199 makeAsyncCall()
    com.google.appengine.api.datastore.DatastoreApiHelper:82 makeAsyncCall()
    com.google.appengine.api.datastore.QueryRunnerV3:36 runQuery()
    com.google.appengine.api.datastore.PreparedQueryImpl:32 runQuery()
    com.google.appengine.api.datastore.PreparedQueryImpl:61 asQueryResultIterator()
    com.googlecode.objectify.impl.engine.QueryEngine$ChunkingToRefIterator:100 &lt;init&gt;()
    com.googlecode.objectify.impl.engine.QueryEngine$1:64 iterator()
    com.googlecode.objectify.util.TranslatingQueryResultIterable:28 iterator()
    com.googlecode.objectify.util.TranslatingQueryResultIterable:11 iterator()
    com.googlecode.objectify.util.ResultProxy$1:26 translate()
    com.googlecode.objectify.util.ResultProxy$1:22 translate()
    com.googlecode.objectify.util.ResultTranslator:21 nowUncached()
    com.googlecode.objectify.util.ResultCache:30 now()
    com.googlecode.objectify.util.ResultProxy:52 invoke()
    com.sun.proxy.$Proxy16:164 toArray()
    co.gov.fonada.planeacion.mb.ContratoMB:67 fillContratos()
  
   @4218ms memcache.Get real=71ms api=0ms cost=0 billed_ops=[]
  Stack:
    com.google.appengine.tools.appstats.Recorder:276 makeAsyncCall()
    com.google.apphosting.api.ApiProxy:199 makeAsyncCall()
    com.google.apphosting.api.ApiProxy:138 makeAsyncCall()
    com.google.appengine.api.memcache.MemcacheServiceApiHelper:95 makeAsyncCall()
    com.google.appengine.api.memcache.AsyncMemcacheServiceImpl:475 doGetAll()
    com.google.appengine.api.memcache.AsyncMemcacheServiceImpl:436 getIdentifiables()
    com.google.appengine.api.memcache.MemcacheServiceImpl:59 getIdentifiables()
    com.googlecode.objectify.cache.EntityMemcache:215 getAll()
    com.googlecode.objectify.cache.CachingAsyncDatastoreService:253 get()
    com.googlecode.objectify.impl.engine.LoadEngine$Round:172 fetchPending()
    com.googlecode.objectify.impl.engine.LoadEngine$Round:118 execute()
    com.googlecode.objectify.impl.engine.LoadEngine:258 execute()
    com.googlecode.objectify.impl.engine.QueryEngine$ChunkingToRefIterator:152 advanceBatch()
    com.googlecode.objectify.impl.engine.QueryEngine$ChunkingToRefIterator:105 &lt;init&gt;()
    com.googlecode.objectify.impl.engine.QueryEngine$1:64 iterator()
    com.googlecode.objectify.util.TranslatingQueryResultIterable:28 iterator()
    com.googlecode.objectify.util.TranslatingQueryResultIterable:11 iterator()
    com.googlecode.objectify.util.ResultProxy$1:26 translate()
    com.googlecode.objectify.util.ResultProxy$1:22 translate()
    com.googlecode.objectify.util.ResultTranslator:21 nowUncached()
    com.googlecode.objectify.util.ResultCache:30 now()
    com.googlecode.objectify.util.ResultProxy:52 invoke()
    com.sun.proxy.$Proxy16:164 toArray()
    co.gov.fonada.planeacion.mb.ContratoMB:67 fillContratos()
  </code></pre>
  
  <p>New Edit:</p>
  
  <p>I've discovered a big string in memcache, with _ahs* key, which is supposed to be a session variable. I think thats the variable thats getting too big. The text includes a copy of the HTML for "debug" and copyright disclaimers of a bunch of products.</p>
  
  <p>The whole text is <a href="http://tny.cz/9f31c86e" rel="nofollow">[clic here]</a></p>
  
  <p>This is part of the text:</p>
  
  <pre><code>&gt; pppppt6mainAccordion:formPago:dataPagos:modelInputFebrero2016uq~uq~uq~ppppuq~q~q~ �q~!q~$q~%q~    �pppppt6mainAccordion:formPago:dataPagos:modelInputFebrero2015uq~uq~uq~ppppuq~q~q~  �q~!q~$q~%q~    �pppppt6mainAccordion:formPago:dataPagos:modelInputFebrero2018uq~uq~uq~ppppuq~q~q~  �q~!q~$q~%q~    �pppppt6mainAccordion:formPago:dataPagos:modelInputFebrero2017uq~uq~uq~ppppuq~q~q~  �q~!q~$q~%q~    �pppppt%mainAccordion:formPago:dataPagos:ajaxuq~uq~uq~sq~Ssq~Ww#{pagoMB.buttonCrear}uq~Yq~[ppxwDB/formContrato.xhtml @806,33 actionListener="#{pagoMB.buttonCrear}"xsq~Ww'#{pagoMB.buttonCrear}java.lang.Voiduq~Yppxppppxxxtfacelets.ui.DebugOutputsr'com.sun.faces.facelets.tag.ui.UIDebug$2#E�#�  -xq~
  ?@wt
  1427384717777|9&lt;!--
  
      DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  
      Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
  
      The contents of this file are subject to the terms of either the GNU
      General Public License Version 2 only ("GPL") or the Common Development
      and Distribution License("CDDL") (collectively, the "License").  You
      may not use this file except in compliance with the License.  You can
      obtain a copy of the License at
      https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
      or packager/legal/LICENSE.txt.  See the License for the specific
      language governing permissions and limitations under the License.
  
      When distributing the software, include this License Header Notice in each
      file and include the License file at packager/legal/LICENSE.txt.
  
      GPL Classpath Exception:
      Oracle designates this particular file as subject to the "Classpath"
      exception as provided by Oracle in the GPL Version 2 section of the License
      file that accompanied this code.
  
      Modifications:
      If applicable, add the following below the License Header, with the fields
      enclosed by brackets [] replaced by your own identifying information:
      "Portions Copyright [year] [name of copyright owner]"
  
      Contributor(s):
      If you wish your version of this file to be governed by only the CDDL or
      only the GPL Version 2, indicate your decision by adding "[Contributor]
      elects to include this software in this distribution under the [CDDL or GPL
      Version 2] license."  If you don't indicate a single choice of license, a
      recipient has the option to distribute your version of this file under
      either the CDDL, the GPL Version 2 or to extend the choice of license to
      its licensees as provided above.  However, if you add GPL Version 2 code
      and therefore, elected the GPL Version 2 license, then the option applies
      only if the new code is made subject to such option by the copyright
      holder.
  
  
      This file incorporates work covered by the following copyright and
      permission notice:
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
  
          http://www.apache.org/licenses/LICENSE-2.0
  
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  
  --&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
  &lt;title&gt;Debug - /editarContrato.xhtml&lt;/title&gt;
  &lt;style type="text/css"&gt;
  body, div, span, td, th, caption { font-family: 'Trebuchet MS', Verdana, Arial, Sans-Serif; font-size: small; }
  ul, li, pre { padding: 0; margin: 0; }
  h1 { color: #090; }
  h2, h2 span { font-size: large; color: #339; }
  h2 a { text-decoration: none; color: #339; }
  .grayBox { padding: 8px; margin: 10px 0; border: 1px solid #CCC; background-color: #f9f9f9;  }
  #view { color: #090; font-weight: bold; font-size: medium; }
  #tree, #vars { display: none; }
  code { font-size: medium; }
  #tree dl { color: #006; }
  #tree dd { margin-top: 2px; margin-bottom: 2px; }
  #tree dt { border: 1px solid #DDD; padding: 4px; border-left: 2px solid #666; font-family: "Courier New", Courier, mono; font-size: small; }
  .uicText { color: #999;  }
  table { border: 1px solid #CCC; border-collapse: collapse; border-spacing: 0px; width: 100%; text-align: left; }
  td { border: 1px solid #CCC; }
  thead tr th { padding: 2px; color: #030; background-color: #F9F9F9; }
  tbody tr td { padding: 10px 6px; }
  </code></pre>
  
  <p>Using @BalusC <code>"poor man's debugging" approach for Listen and debug JSF lifecycle phases</code>, I found out the error after <code>END PHASE RENDER_RESPONSE 6</code>.</p>
  
  <p>Still dont know whats making my app to write these files to the storage.</p>
  
  <p>Any help greatly appreciated.</p>