akwei / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Age value being reset when key being requested if age over 60. #342

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run memcached with -vv
2. Monitor the log for the {s,g}et of a specific key.
3. Regularly, (say every 5 - 10 sec) run a request for the monitored key.
4. Run a watch statement on memcached-tool display, monitoring the age of the 
key.

What is the expected output? What do you see instead?
I expect the age value to keep growing until the key gets set.

I see the age being reset to 0 at the first get request after 60 seconds, 
despite no set being logged in either my application, nor memcached's log.

What version of the product are you using? On what operating system?
1.4.5. CentOS 5.9.

Please provide any additional information below.
Normally my application would not set and expiry in memcached, but instead 
manage it's own expire value as a part of the value, so I expect the value to 
be kept around "forever". As far as I can tell, that's what happens, but the 
age value indicates otherwise.

If I set an expire of 90 seconds, I see the age tick up to 60, reset to 0, tick 
up to 30, set request comes in, so the age resets again, and then the process 
repeats.

I've done what I can to reasonably rule this out as an error in my application, 
but it's obviously entirely possible that I'm missing something.

Kind regards, Claes

Original issue reported on code.google.com by Lethar...@gmail.com on 20 Sep 2013 at 12:39

GoogleCodeExporter commented 9 years ago
Occasionally people open these sorts of tickets, but I've never ever seen a 
single instance where the value was actually expiring "early".

I'm going to close this out and you should continue this on the mailing list if 
you still need help, but your application is setting the expiration time to 60 
seconds.

If you're running memcached with -vv or -vvv you can see what the full set 
arguments were, and if it's being expired via timeout or a flush or whatever 
while being fetched.

Original comment by dorma...@rydia.net on 20 Sep 2013 at 4:48