Google App Engine - Calling getSession().invalidate(); causes app engine to act weird.

Posted by Spines on Stack Overflow See other posts from Stack Overflow or by Spines
Published on 2010-05-29T23:19:16Z Indexed on 2010/05/29 23:22 UTC
Read the original article Hit count: 400

Filed under:
|
|

When I call hreq.getSession().invalidate(); app engine slows down tremendously. I looked at appstats and saw that on a page where no database calls are made, it was calling memcache.get and datastore.get 23 times each. The stack trace of these calls showed that it was being called from getSession(). This only happens on the production server. Every time I make a request to a page, it makes a bunch of memcache and datastore calls. This slow down goes away though when i restart my browser.

When I changed the code to simply set the isLoggedIn property of the session to false, rather than calling hreq.getSession().invalidate();, everything was fine.

As a test, I didn't invalidate my session, but I changed the value of my browser's session cookie, and the app engine exhibited the same behavior.

Is this a bug with the app engine?

© Stack Overflow or respective owner

Related posts about java

Related posts about google-app-engine