Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Memcache session does gets twice

#949

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


  #config/environment.rb
  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 STORED
<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 [FEATURE] More efficient session handling

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.

Reported by Peter Liu · September 1st, 2008 @ 08:41 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to wontfix

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

    December 15th, 2008 @ 09:03 PM