memory leaks when posting data

53 views
Skip to first unread message

merchant service

unread,
Mar 6, 2012, 1:20:31 PM3/6/12
to Google App Engine
I have very simple app which consists of one file. Code is below. When
I just deploy application and open form my instance takes ~37 MB
Memory. I can assume this is app engine itself. If I start using this
form to post 1Mb, memory is raised unexpectedly after each post
(approximately for 2 MB after each post, but sometimes it even more).
If I post 2 MB it is raised on 12 MB etc...I can't find dependency
between post size and memory usage, but it's either memory leaks in
code below, or weird behavior in GAE.

Any thoughts will be useful. Thanks!

[code]
import cgi
import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util

class MainHandler(webapp.RequestHandler):
def get(self):
logging.info("get...")

def post(self):
logging.info("posting...")
s = cgi.escape(self.request.get('content'))
self.response.out.write("Post length: %s" % l)

application = webapp.WSGIApplication([('/', MainHandler)], debug=True)
util.run_wsgi_app(application)
[/code]

Brandon Wirtz

unread,
Mar 6, 2012, 2:59:37 PM3/6/12
to google-a...@googlegroups.com
The post data is Held to be used. +2M
You "Get Self" +2M
S= .... +2M

Tack on some for encoding. And such... you are at 9M pretty easy, so 12M is
not unbelievable.

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-
> appengine+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

Kaan Soral

unread,
Mar 6, 2012, 3:03:28 PM3/6/12
to google-a...@googlegroups.com
Does the instance die after a while?
Reply all
Reply to author
Forward
0 new messages