我得到了一个错误:
The request to API call datastore_v3.Put() was too large.
File "/base/data/home/apps/s~app-prod/version/controllers/app/file.py", line 470, in function_name
temp_o.put()
RequestTooLargeError: The request to API call datastore_v3.Put() was too large.
以获取以下代码:
temp_o = models.Temp.all().get()
temp_o.list = json.dumps(temp_list)
temp_o.put()
当我使用以下代码获得temp_o.list的大小时:
logging.info('size of list = %s', sys.getsizeof(temp_o.list))
我得到的结果是:
size of list = 4241156
因为sys.getsizeof()以字节为单位返回值,所以这只有4.2MB。为什么只保存4.2MB的数据会导致Google App Engine中的RequestTooLargeError?
发布于 2015-09-09 02:14:23
这是由于1MB的最大实体大小限制。在我的例子中,temp_o.list是一个TextProperty。请参阅cloud.google.com/appengine/docs/python/datastore (滚动到页面底部)
https://stackoverflow.com/questions/32464568
复制相似问题