I'm using php memcached extension to save my app sessions on two
servers. All works fine until I stop a memcached daemon on one of
those servers ( to test the failover scenario).
Memcached is set like this:

$mm = new Memcached();
$mm-
>setOption(Memcached::OPT_DISTRIBUTION,Memcached::DISTRIBUTION_CONSISTENT);
$mm->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
$mm->setOption(Memcached::OPT_NUMBER_OF_REPLICAS, 2);
$mm->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT,1);

There are two servers set in session.save_path.

When one of the memcached daemons is terminated, I  immediately get a
warning in my app :
Warning: Unknown: Failed to write session data (memcached). Please
verify that the current setting of session.save_path is correct
(server1:11211,server2:11211) in Unknown on line 0

and my session is gone.

What am I missing?
I use memcached ver 2.0.0b1.
I also tested without setting the OPT_SERVER_FAILURE_LIMIT =1 , got
the same result.

Thanks,
Sergey

Reply via email to