My app uses gae(objectify) to data storage.
I use it also to store files, images, etc.
When i try to show my page with images that are stored in gae, the exception is raised:
2010-10-18 09:23:28 com.vaadin.terminal.gwt.server.GAEApplicationServlet service
SEVERE: com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large.: com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large.
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:289)
at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:265)
at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Probably the reaso is that the session is also stored in datasource
vaadin+gae and with images it really exceed limit.
Is the problem the size of a single image, the total size of the data store or the size of sessions? If the total data store capacity is too small, you might need to upgrade to a paid GAE version.
For sessions:
You cannot disable storing Vaadin sessions in GAE - nothing would work in that case.
If the problem is fields in which you are keeping references to image data, you could and probably should make them transient and reload/recreate them on demand. For static images served from GAE, you should use resources that do not cause them to be loaded on the server side and included in the session.
The only truly problematic case I see is when very large images are generated by the server and need to be kept in memory - such situations need to be evaluated case by case.
The advice about keeping transient references on GAE also applies to many other large data structures, containers etc. that can be reloaded with little resource consumption.
It is a session’s size issue, after resizing image - it works.
You wrote, session storage is mandatory - is it possible to automatically removing expired sessions?
I’ve chcecked my session’s size: it is about 40kb and the problem occured after adding ~60kb size image ( i suppose the limit for the session is 100kb)
Is there any way to change the max size of stored session?