I understand that the memcache session handling for D7 is not yet stable... though looking at https://drupal.org/node/656838 it seems that this mainly has to do with things like mixed http/https sessions, and that the session handler may work fine for a typical use case?
Question 1: what's the worst the can happen when using the memcache session handling? I'm willing to risk a bit of site/session instability, but would not want to risk potentially corrupting my db, for instance...
Question 2: here are the relevant memcache settings in my settings.php... does everything look good here? Specifically, I see from the readme that I need a separate memcache server for the session table and the users table... is it okay to have just three servers then, and put all my cache tables in 'default', while putting 'session' and 'users' in their own dedicated server?
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
// DB Cache.
// Ensure that the special cache_form bin is assigned to non-volatile storage.
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
// Locking.
$conf['lock_inc'] = 'sites/all/modules/memcache/memcache-lock.inc';
// Stampede protection.
$conf['memcache_stampede_protection'] = TRUE;
// Servers
$conf['memcache_servers'] = array(
'5.9.54.111:11211' => 'default',
'5.9.54.111:11212' => 'session',
'5.9.54.111:11213' => 'users',
);
// Bins
$conf['memcache_bins'] = array(
'cache' => 'default',
'cache_admin_menu' => 'default',
'cache_apachesolr' => 'default',
'cache_block' => 'default',
'cache_bml_experiment' => 'default',
'cache_bootstrap' => 'default',
'cache_field' => 'default',
'cache_filter' => 'default',
'cache_image' => 'default',
'cache_libraries' => 'default',
'cache_mailchimp_user' => 'default',
'cache_menu' => 'default',
'cache_path' => 'default',
'cache_rules' => 'default',
'cache_token' => 'default',
'cache_update' => 'default',
'cache_views' => 'default',
'cache_views_data' => 'default',
'session' => 'session',
'users' => 'users',
);
Comments
Comment #1
beardedgeek commentedDid you ever find out the best way of doing this?
Comment #2
jordanmagnuson commentedI switched to the Memcache Storage module, which handles sessions out of the box.
Comment #3
Ben Greenberg commentededit: I asked a question about memcache storage, not realizing this was a "memcache" module issues thread. I will contact original poster directly with my question. Admins/Mods can delete this comment if they want.
Comment #4
jordanmagnuson commentedI'm using 7.x-1.4. It's stable and works well (and is supported). Hasn't seen an update because it hasn't really needed one... the dev branch is actively being worked on for some new experimental improvements.
Comment #5
vedpareek commentedHello @ Jordan,
I am also using memcache storage for include session. Is it require add new memcache server for session on nginx.
Thanks
Comment #6
hypertext200I don't think it is a good idea to store session information in the memcache, memcache is a non-volatile storage and if you really wants your session to be stored somewhere else think about Redis.
Comment #8
jeremy commentedRemoving sessions support from the Memcache module as it was never finished and only causes confusion. Sessions are not a good fit for Memcache, I agree w/ @heshanlk that if this is a requirement for you, consider something like Redis.