This project is archived and is in readonly mode.
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/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
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 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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Tags
Referenced by
- 1653 Per-request in memory cache for all communication with the MemCache server(s) The description linked to essentially describes two chang...