Bugs: Browse | Submit New | Admin

[#21775] unexpected response "STORED\r\n" from a cache_get call

Date:
2008-09-02 17:18
Priority:
3
Submitted By:
cody caughlan (gonzoprosperity)
Assigned To:
Mike Perham (mperham)
Category:
memcache-client
State:
Open
Summary:
unexpected response "STORED\r\n" from a cache_get call

Detailed description
Using memcache 1.5.0

We have a pretty busy site and use memcache for both sessions and fragment caching. We get about 10-15 of these exceptions
a day.

unexpected response "STORED\r\n"
 [RAILS_ROOT]/vendor/gems/memcache-client-1.5.0/lib/memcache.rb:562:in `cache_get'

The relevant code in cache_get is

    unless keyline =~ /(\d+)\r/ then
      server.close
      raise MemCacheError, "unexpected response #{keyline.inspect}"
    end


What is very strange is that according to the memcache API, the server will only send back "STORED" from a
*set* call, never a *get*, which is where this is happening. The only think I can think of is that somehow 2 or more
communication streams are getting crossed?

Any ideas?

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-02-18 01:58
Sender: Mike Perham

I'd guess you are using Rails in threadsafe mode.  You need to
make sure you pass the :multithread => true option in your
configuration:

config.cache_store = [:mem_cache_store, 'localhost:11211', {
:multithread => true }]

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
summaryunexpected response "STORED\r\n" from a cache_get call2009-03-31 00:03zenspider
summaryunexpected response "STORED\r\n" from a cache_get call2009-02-18 01:58mperham
category_idNone2009-02-18 01:03zenspider
assigned_tonone2009-02-18 01:03zenspider
summaryunexpected response "STORED\r\n" from a cache_get call2009-02-18 01:03zenspider