Re: Memcache seems to be cleared periodically

138 views
Skip to first unread message

Bryce Cutt

unread,
Sep 26, 2012, 4:18:57 PM9/26/12
to google-a...@googlegroups.com
That sounds pretty consistent with my own experience.

https://developers.google.com/appengine/docs/python/memcache/overview#How_Cached_Data_Expires

If you want better guarantees you may want to star this issue:


On Tuesday, September 25, 2012 3:48:09 PM UTC-7, Tom Saulpaugh wrote:
I've been observing our production system memcache stats today and noticed that the oldest object in the cache is only 7 minutes old.  On our test system, running the same code, the oldest object is over 4 hours old.  On our production system, I saw today at least 3 times where the oldest aged object would get up to as high as 33 minutes but then fall back to 1 minute or so.  We are using Objectify to set the cache expiration time for our entity objects.  These times range from 10 minutes to 2 hours.

Are there any known conditions where memcache is cleared due to errors or quotas? (or something else?).  Has anyone else seen this behavior?

Thanks,
Tom

Drake

unread,
Sep 26, 2012, 4:53:35 PM9/26/12
to google-a...@googlegroups.com

Memcache can empty at any moment. It is not to be used for anything other than cache.

you can do a set in one line and get in the next line and have the value be not found.

 

 

From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of Tom Saulpaugh
Sent: Tuesday, September 25, 2012 3:48 PM
To: google-a...@googlegroups.com
Subject: [google-appengine] Memcache seems to be cleared periodically

 

I've been observing our production system memcache stats today and noticed that the oldest object in the cache is only 7 minutes old.  On our test system, running the same code, the oldest object is over 4 hours old.  On our production system, I saw today at least 3 times where the oldest aged object would get up to as high as 33 minutes but then fall back to 1 minute or so.  We are using Objectify to set the cache expiration time for our entity objects.  These times range from 10 minutes to 2 hours.

 

Are there any known conditions where memcache is cleared due to errors or quotas? (or something else?).  Has anyone else seen this behavior?

 

Thanks,

Tom

 

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

timh

unread,
Nov 6, 2012, 3:50:24 AM11/6/12
to google-a...@googlegroups.com
Expiration/expunging of memcache data is affected by a number of things.  How much you have in memcache, frequency of hits, how much else is going on in google land (ie in that machines you happen to be running on etc).

I have only 33MB in cache (1058 items) a 94% hit rate and the oldest item is 17 hours.

There do seem to be some high water marks which when you start exceeding them stuff will get expunged more quickly.

T


On Monday, November 5, 2012 2:32:04 PM UTC+8, devlike wrote:
"you can do a set in one line and get in the next line and have the value be not found."

Yes, but when cached data is cleared too often, and too soon, it defeats the purpose of memcaching things.
Reply all
Reply to author
Forward
0 new messages