API调用datastore_v3.Put()的请求太大。使用Objectify(DataStore)而不上传文件

Enr*_*zar 3 session google-app-engine primefaces jsf-2 google-cloud-datastore

我收到以下错误。

com.google.apphosting.api.ApiProxy $ RequestTooLargeException:对API调用datastore_v3.Put()的请求太大。

我正在使用Objectify 4.0,没有上传任何文件。我正在为我的应用程序使用DataStore,但1Mb以上的唯一项是实体中的_valuesBlob _ah_SESSION

控制台的映像位于:http : //goo.gl/qP7v7U

我不知道如何解决该问题,即使之前已问过错误,我的问题是我没有使用文件,而实际上是在使用数据存储。

编辑:再次测试,它似乎在删除操作中中断。这是日志。

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)
Run Code Online (Sandbox Code Playgroud)

任何帮助表示赞赏。

AppStat错误堆栈

@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 <init>()
  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 <init>()
  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()
Run Code Online (Sandbox Code Playgroud)

新编辑:

我在内存缓存中发现了一个大字符串,带有_ahs *键,该字符串应该是会话变量。我认为多数民众赞成在变量太大。文本包括用于“调试”的HTML副本以及一堆产品的版权免责声明。

全文为[clic here]

这是文本的一部分:

> 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<!--

    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.

-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Debug - /editarContrato.xhtml</title>
<style type="text/css">
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; }
Run Code Online (Sandbox Code Playgroud)

使用@BalusC "poor man's debugging" approach for Listen and debug JSF lifecycle phases,我发现了之后的错误END PHASE RENDER_RESPONSE 6

仍然不知道是什么使我的应用程序将这些文件写入存储。

任何帮助,不胜感激。

And*_*gin 6

1MB限制适用于所有数据存储区实体。您需要将大型实体分解为较小的部分。

请注意,会话同时由Memcache和数据存储区备份,并且它们对单个实体的限制均为1MB。确保您放置在会话中的所有实体都远低于此限制。