This project is archived and is in readonly mode.

#949 ✓wontfix
Peter Liu

Memcache session does gets twice

Reported by Peter Liu | September 1st, 2008 @ 08:41 AM | in 2.x

When a new rails application is created and the session_store is configured for memcache by:

  config.action_controller.session_store = :mem_cache_store

The session is being request twice from the memcached server. I ran memcached with the -vv option to get a detailed transcript on what transactions are taking place. I then created a simple Hello World controller. When I run the action, this is what's showing on the console.

<22 new client connection
<22 get session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 sending key session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 END
<22 get session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 sending key session:f963e5b1ad3a5bd0b1d622c0b803a370
>22 END
<22 set session:f963e5b1ad3a5bd0b1d622c0b803a370 0 0 61
<22 connection closed.

Tried putting a delay on the controller by sleeping for 10 seconds and it's showing that it's getting the key twice, wait for 10 seconds, then setting the key. I searched everywhere to find out why it's reading the keys twice on google, the gem source code, and on the ticketing system but no luck. It seems it's an extra read for no reason.

This may be related to #92

I'm running rails-2.1.0, memcache_client-1.5.0 on OS X Leopard. I tried both in development mode and production mode.

Comments and changes to this ticket

  • josh

    josh December 15th, 2008 @ 09:03 PM

    • State changed from “new” to “wontfix”

    2.3 sessions will be completely rewritten. Hopefully I've fixed this issue in the new branch.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by