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

beardedgeek’s picture

Did you ever find out the best way of doing this?

jordanmagnuson’s picture

I switched to the Memcache Storage module, which handles sessions out of the box.

Ben Greenberg’s picture

edit: 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.

jordanmagnuson’s picture

I'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.

vedpareek’s picture

Hello @ Jordan,

I am also using memcache storage for include session. Is it require add new memcache server for session on nginx.

Thanks

hypertext200’s picture

I 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.

  • Jeremy committed 3bef235 on 7.x-1.x
    Issue #2241639: Remove unsupported and incomplete memcache sessions...
jeremy’s picture

Status: Active » Fixed

Removing 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.