"Set" and then "get" don't retrieve the stored value
Kristian Hellquist
kristian.hellquist at gmail.com
Mon Nov 13 17:03:15 UTC 2006
Hi all!
Im happy user of memcached but I have run into some strange problems.
In some cases memcached doesnt retrieve the value that I just set.
When using "ngrep" the value seems to be stored in memcached, memcached
returns "STORED". But, If I try to do a "get" I get a blank value
back, and if try to "delete" the value I get "NOT_FOUND". Do I have to
wait a specific time before the value can be retrieved?
Im pretty sure that the same key is used in all cases and the dump
seems to confirm this, if I have read it correctly.
Anyone have a clue of whats is going on here or have a suggestion of
how I can debug this further? Im using memcached 1.2.0.
/Cheers Kristian
Heres the dump from ngrep and last information about memcached status
provided from the command "stats":
T 127.0.0.1:36144 -> 127.0.0.1:11211 [AP]
set 65b05a7489ea704c5afb80fee7b029497a80beac 0 0
1376....o:.View.:. at new_recordT:. at viewableo:@ActiveRecord::Associations::BelongsToPolymorphicAssociation
.:. at targeto:.User.:. at attributes{+".new_email0".screen_name_soundex0".login_soundex".1".updated_at0".login_nysiis".BAB".birthdate0".invited_users_count".
0".secret_upload_email".my_dog_ate_my_mom".screen_name_reversed0".about_me"4Bobby
is friend to other bobbians. Bla bla bla.".country_id".SW".activation_
code".".gender0".screen_name_nysiis0".rank".1".is_active".t".id".1".about_me_header".Bobby
is bad to the bone".login_reversed".ybbob".birthday".2000-02-
12".screen_name".bobby".last_email_bounce_at0".email_bounces".0".email_activation_code".".profile_type_name".People".time_zone".Stockholm".user_quote".b
obby is the bestest".first_name".Bob".screen_name_lowered0".inhabited_location_id".1".last_name".Thornton".password"-42c0c4e207b42710a8bd62d07cfd89d7249
8e26d".login".bobby".continent_id0".login_lowered".bobby".created_at".2006-01-01
00:00:00".email".bobby at test.adocca.com".superuser".0:. at loadedT:. at reflec
tiono:4ActiveRecord::Reflection::AssociationReflection.:. at options{.:.foreign_type".viewable_type:.polymorphicT:. at class_name".Viewable:. at active_recordc.V
iew:. at primary_key_name".viewable_id:. at through_reflectionF:. at name:.viewable:. at macro:.belongs_to:. at updatedT:. at owner@.;.{.".viewed_atu:.Time.......
\".time
_zone".Stockholm".viewable_type".User".user_idi.".viewable_idi...
#
T 127.0.0.1:11211 -> 127.0.0.1:36144 [AP]
STORED..
##
T 127.0.0.1:36144 -> 127.0.0.1:11211 [AP]
get 65b05a7489ea704c5afb80fee7b029497a80beac..
#
T 127.0.0.1:11211 -> 127.0.0.1:36144 [AP]
END..
##
T 127.0.0.1:36144 -> 127.0.0.1:11211 [AP]
delete 65b05a7489ea704c5afb80fee7b029497a80beac 0..
#
T 127.0.0.1:11211 -> 127.0.0.1:36144 [AP]
NOT_FOUND..
#
And here is info from "stats":
STAT pid 18766
STAT uptime 3566
STAT time 1163436542
STAT version 1.2.0
STAT pointer_size 32
STAT rusage_user 0.022996
STAT rusage_system 0.061990
STAT curr_items 3
STAT total_items 45
STAT bytes 3348
STAT curr_connections 4
STAT total_connections 16
STAT connection_structures 5
STAT cmd_get 37
STAT cmd_set 45
STAT get_hits 2
STAT get_misses 35
STAT bytes_read 42109
STAT bytes_written 7694
STAT limit_maxbytes 134217728
More information about the memcached
mailing list