If i enable "memcache-session.inc" in settings.php every time after I go to 'admin/build/modules' I get logged out.
To test it just hit refresh after you access that page. In any other page, everything is oki (the module works as expected).

I have less than 5 modules enabled and i don't think is there anyone that interferes with the memcache module.

Can anyone confirm this ?

Comments

jojje’s picture

I also experience this behaviour. It also happens after clearing the cache under Admin-Performance-Clear Cache. My configuration for memcache:

$conf = array(
'cache_inc' => './sites/all/modules/memcache/memcache.inc',

'session_inc' => './sites/all/modules/memcache/memcache-session.inc',

'memcache_servers' => array('localhost:11211' => 'default'),

'memcache_bins' => array('cache' => 'default',
'session' => 'default',
'users' => 'default')
);

Is this maybe happening because I use the same memcache server for users and sessions as for cache?

jojje’s picture

Well it seems like session and users need it's own server. When I changed to the config below, with two servers, the problem disappeared.

$conf = array(
'cache_inc' => './sites/all/modules/memcache/memcache.inc',

'session_inc' => './sites/all/modules/memcache/memcache-session.inc',

'memcache_servers' => array('localhost:11211' => 'default',
'localhost:11212' => 'cluster2'),

'memcache_bins' => array('cache' => 'default',
'session' => 'cluster2',
'users' => 'cluster2')
);

jvandyk’s picture

Status: Active » Closed (works as designed)

From the README, emphasis added:

Here is a sample config that uses memcache for sessions. Note you MUST have
a session and a users bin set up for memcached sessions to work.

I've changed this to read

Note you MUST have
a session and a users server set up for memcached sessions to work.

Otherwise, when you clear your cache, you blow away all the sessions.

andreiashu’s picture

Thanks guys, issue solved. Next time I'll read the README :)

jahsh’s picture

I am having a similar issue, but get the white screen of death. Can anybody see the issue with my config in settings.php?

$conf = array(
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
'session_inc' => './sites/all/modules/memcache/memcache-session.inc',
'memcache_servers' => array(
'127.0.0.1:11211' => 'default',
'127.0.0.1:11212' => 'filter',
'127.0.0.1:11213' => 'menu',
'127.0.0.1:11214' => 'page',
'127.0.0.1:11215' => 'session',
'127.0.0.1:11216' => 'users',
),
'memcache_bins' => array(
'cache' => 'default',
'cache_filter' => 'filter',
'cache_menu' => 'menu'
'cache_page' => 'default',
'session' => 'session',
'users' => 'users',
),

);

I just get the white screen of death. If I comment out these 3 lines it works fine:

'cache_page' => 'default',
'session' => 'session',
'users' => 'users',

The error in the nginx logs shows this:

*15794 FastCGI sent in stderr: "PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/html/site_name.com/sites/default/settings.php on line 111" while reading response header from upstream, client: x.x.x.x, server: test-site-name.com, request: "GET /admin HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "qa.site_name.com"

The line 111 is this:

'cache_page' => 'default',

Please Help!