I am reading the documentation regarding memcache failover and it is my understanding that it should work automatically, if memcache.allow_failover = 1
However, it is not working in my case
public function __construct(array $settings) {
$this->link = new \Memcache();
foreach($settings['servers'] as $server){
list($server, $port, $weight) = explode(':', $server);
$this->link->addServer($server, (int) $port, 0, (int) $weight);
}
}
the servers array is like this
["slave01:11211:1","slave02:11211:1"]
Once I stop one of them and try to write something, I get an exception that memcache cannot connect to the server I am using pecl-memcache 2.2.7
Any ideas?
Thanks