GAE - disable session storage (_vac<sessionid>)

Hello,

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.

So is it possible to disable that feature?

Best regards,

Tomasz

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?

Regarding Expired sessions, I found cron.xml, so it is solved.

Regarding Images:

Preview image (100x80) has about 10kb
But default image has 500kb and it is a problem with session storage.

For clarification:
My images (Embedded) are stored in GAE as Blob and I use ImageService to provide preview images (‘Transform’)

At this moment i solve my problem by changing default image size to less than 100kb.

How can i get the current session size?

I’m having the same problem, i want to load 10 images from AppEngine as Blobs and always get

tomasz, have you found anything else about this problem? Do you know how to get the current session size?

I’m also interested in calculating session size. I found the following link:

http://stackoverflow.com/questions/1077892/jee-find-session-size

but not sure it applies for GAE