Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8901787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:26:53+00:00 2026-06-15T01:26:53+00:00

webapp2_extras’ sessions are pretty useful, and I’ve been using them to keep users logged

  • 0

webapp2_extras’ sessions are pretty useful, and I’ve been using them to keep users logged in and such. But there’s not much documentation about it. For instance: which is the memory limit for an entry in the session dictionary?

So far I’ve stored strings and numbers. But I need to store a whole image, uploaded from a HTML form (the idea is that this image is temporary and it may be discarded, so I don’t want to store it in the datastore until I’m sure I have to do it). It doesn’t seem to work, and I guess I’m hitting a memory problem:

self.session['photo_image']  = self.request.get("photo_image")

Is that so? I guess there are memory limits, but I can’t find them. How else could I store a temporary image in GAE?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:26:55+00:00Added an answer on June 15, 2026 at 1:26 am

    You can store it in ‘instance memory’, e.g. create a global list when your script starts up and append incoming images to that, then remove it once done. Of course, you’ll soon run of of memory there also if you have lots of users/large files. And you’ll lose it all when the instance shuts down and you’ll (might) have problems if more then one instance is running.

    So Memcache sounds perfect for this.
    using Memcache

     def get_data():
        data = memcache.get('key')
    
        if data is not None:
            return data
        else:
            data = self.query_for_data()
            memcache.add('key', data, 60)
            return data
    

    Yes, it’s not 100% reliable as I’m sure you’ve heard but if you are not using 100’s of files that are huge and keeping them round for ages you probably won’t have issues. As it’s first in first out (IIRC) if you process them more or less in order that’ll be even less likely to lose data. I think memcache is going to be your best option here, try it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've been using git for the first time, and there is a scenario
First off, I'm using Google AppEngine and Guice, but I suspect my problem is
I'm using the latest version of Google App Engine, Python 2.7 and webapp2, but
I am trying to put together an application using yii-user and yii-eauth extensions but
I've been using the jQuery tmpl library for some projects and really liking it.
I am using appengine with python 2.7 and webapp2 framework. I am not using
I hoped that webapp2 routing would be easy but apparently it is not (for
Using webapp2 I create unit tests for a form where there are checkboxes for
I am using appengine webapp2 as wsgihandler, jinja2 as the template engine and wtforms
I am using webapp2, ndb model. I was trying to use django model forms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.