memcached seems unable to return values on "get" but can "delete"

Gabe Schine gabe.schine at gmail.com
Fri Feb 2 22:32:30 UTC 2007


sure. we're running 1.1.12

the commandline is:
/usr/local/bin/memcached -u user -p 3307 -d -m 757 -vv -P /var/run/ 
memcached.pid

i don't have a specific script to reproduce it as the setting of the  
keys actually happens in our production environment through a Java  
client (which we got linked from danga.com)

i am testing it like this:

1) watch the logs on the production server (here named stas01) to see  
what keys it's logging when (we modified the java client so that it  
would log things -- no other changes)
2) i grab those keys and, from the same server (stas01), i perform  
this command:

	perl -e 'sleep 1; print "get <key>\r\n";' | nc stcache01 3307

which returns me "END" for the keys that don't seem to work, and a  
"VALUE ..." line followed by "END" for the keys that do work.

3) to delete the key i do

	perl -e 'sleep 1; print "delete <key>\r\n";' | nc stcache01 3307
response: "DELETED"
	and again:
	perl -e 'sleep 1; print "delete <key>\r\n";' | nc stcache01 3307
this time: "NOT_FOUND"

that's the best i can do right now for a "script" to reproduce the  
problem.

things from our log file look like this:

Feb 02 14:29:08 S 344607721: ++++ trying to compress data
Feb 02 14:29:08 S 344607721: ++++ size prior to compression: 75493
Feb 02 14:29:08 S 344607721: ++++ compression succeeded, size after:  
13613
Feb 02 14:29:08 S 344607721: ++++ memcache cmd (result code): set  
-169745106 10 0 13613\0D\0A (STORED)
Feb 02 14:29:08 S 344607721: ++++ data successfully stored for key:  
-169745106

hope this helps...

gabe

On Feb 2, 2007, at 2:17 PM, Jehiah Czebotar wrote:

> i don't have any ideas yet; but it might be good if you can mention
> which memcached server version you are using, cmd line options to
> start memcached, and os rev etc, and if you can write and post a
> simple script that duplicates this problem that's always useful to
> send to the list.
>
> --
> Jehiah
>
> On 2/2/07, Gabe Schine <gabe.schine at gmail.com> wrote:
>> hey there,
>>
>> so we have a single memcached installation serving about five
>> servers. it has been working great, however:
>>
>> certain types of data, usually blobs of about 6k in size, seem to get
>> "lost" or something. we store the value with 30 min timeout and a
>> flags value of "8", and subsequent gets just return "END", no value.
>> HOWEVER, what's odd is, I can contact the memcached server and tell
>> it to "delete" that key, and that succeeds, leading subsequent
>> deletes to return "NOT_FOUND", so i'm thinking memcached finds the
>> data only when i want to delete it.
>>
>> other data, usually ~600 bytes, seems to work fine. there are two
>> differences between data A (doesn't work) and B (works):
>>
>> 1) the keys for A are formatted like this:
>>
>>                 Mind.1:-73828371281
>>
>>         whereas for B they are something like:
>>                 xxx:1234567890ABCD
>>
>> and 2) data B has an infinite timeout (value of 0) instead of the
>> usual 30 mins
>>
>> lastly, if i try to "set" a value using the perl memcached client, i
>> always get back "SERVER_ERROR: Out of memory" even though i KNOW the
>> server isn't out of memory, and our Java production install client
>> seems to be able to set keys just fine (barring the above anomaly).
>> i'm at the end of my rope here and am just scraping the floor for
>> ideas -- anything at all would be hugely appreciated!
>>
>> thanks very much,
>>
>> gabe
>>



More information about the memcached mailing list