Skip to content

Strange behaviour when one server is missing #569

Description

@mokraemer

Using php-memcached 3.2.0:

I encounter some strange things, when you add the servers via

$cache = new Memcached(/* $id */);
$cache->setOptions([
	Memcached::OPT_BINARY_PROTOCOL => true,
	Memcached::OPT_PREFIX_KEY => $id . '_',
	Memcached::OPT_COMPRESSION => true,
	Memcached::OPT_CONNECT_TIMEOUT => 30,
	Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,
	Memcached::OPT_SERVER_FAILURE_LIMIT => 2,
	Memcached::OPT_REMOVE_FAILED_SERVERS => true,
	Memcached::OPT_RETRY_TIMEOUT => 60,
]);
$cache->resetServerList();
$cache->addServers([
 ['server1',11212,0],
 ['server2',11212,0]
]
]);

you can call $cache->getStats which works fine and gives you informations.
If you then stop e.g. server2, memcache does not reliably work and if you call $cache->getStats it just returns "false".
I guess this condition, having one server down is not handled correctly and getStats just shows the problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions