Posted by cbccharlie on February 19, 2014 at 4:07pm
Hi,
I have a drupal installation with two frontend servers, which have a memcached server in each. If I'm surfing the frontend 1 and the frontend 2 memcached goes down, the page stops loading correctly. Has anyone ever had this problem?
Thank you very much.
Comments
What is memcache configuration?
Do you use "consistent" for the hash strategy in your php.ini
memcache.hash_strategy=consistent
http://www.php.net/manual/en/memcache.ini.php#ini.memcache.hash-strategy
This is now the default (I think starting with PHP 5.5), but that is not the case with older version.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Thank you very much, but I
Thank you very much, but I already have turned this property for PECL memcached (memcached.sess_consistent_hash = On)
I use PHP Version 5.3.3.
What about settings.php?
What about settings.php?
Is it the same on each application server? Do you list more than one memcache instance, by the same IP address?
For example:
$conf['memcache_servers'] = array(
'10.0.0.11:11211' => 'default',
'10.0.0.12:11211' => 'default',
);
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
My config
My config is:
$conf['memcache_servers'] = array(
'192.168.130.222:11211' => 'default',
'192.168.130.224:11211' => 'default',
);
Some things to check...
Are you sure that the application isn't sharing the same memcached configuration for one server? Have you checked the usage of the two memcached servers?
Are you using a memcached cluster? If not, why do you have two distinct servers for the same application? If distinct, that's making your caching backend do twice the work.
I use a distributed
I use a distributed memcached.
My server config is:
$conf['memcache_servers'] = array(
'192.168.130.222:11211' => 'default',
'192.168.130.224:11211' => 'default',
);
$conf['memcache_options'] = array(
Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,
);
Thank you very much.
PHP memcached vs. PHP memcache
So, you are using the memcached PECL package, not memcache (without a "d").
I have seen issues with it a while back.
Try going with the memcache package instead and add the hash_strategy=consistent to php.ini, and see if it makes a difference.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
I tried memcache package and
I tried memcache package and now the site load properly, although a node is stopped.
Thank you very much for everything.
Little confusion
Without the memcached PHP extension is it possible to use class
Memcached
? ORMemcached
is also available in memcache PHP extension, as far http://www.dugwood.com/895442.html all the constants e.g.OPT_DISTRIBUTION
are available for memcached PHP extension