Hello experts,
I have a very weird problem, when storing my session in Memcached. From time to time some users takes the session of others. E.g. John, becomes logged in as Maria, Maria as Chris and so on.
I use Rails 2.3.4, but the same problem has been happening with earlier versions of Rails. I use only one Memcache server and it's running on the same machine. The problem with debugging this is that I can not reproduce it.
I'll be very glad if anybody can guide me how to solve this problem or debug it. I'll be also happy if you are using Memcached for sessions and you share your example confgs.
These are my configurations:
# memcache options
memcache_options = {
:c_threshold => 10_000,
:compression => false,
:debug => false,
:namespace => 'app_prod',
:readonly => false,
:urlencode => false,
}
memcache_servers = ['localhost:11211']
CACHE = MemCache.new(memcache_options)
CACHE.servers = memcache_servers
config.cache_store = :mem_cache_store, memcache_servers, memcache_options
config.action_controller.session_store = :mem_cache_store
config.action_controller.session = {
:session_key => '_appname',
:cache => CACHE,
# :expires => 10,
# :session_expires => 10,
:secret => '5391aaaaaaaaaa56f8e8234beb638b97b32bbbbbbbbbbcc9dcae2beccccccccc89e8b508328def001a368da0678b061eb0e9d5a82a5ac94c8d35bd31a9a49e1'
}
Thank you in advance, Stan