Skip to content

Not working auto remove failed server #572

Open
@kansey

Description

@kansey

We have two independent Yii2 applications that cache the database schema using Memcached.

Each application is configured with two Memcached servers:

App 1: memcached-server-1, memcached-server-2

App 2: memcached-server-2, memcached-server-1 (reverse order)

Problem:

If memcached-server-1 goes down → everything works fine, caching continues on memcached-server-2.

If memcached-server-2 goes down → caching stops working for both applications.

I expected that when one Memcached server is down, the surviving server should continue to store and retrieve the cached DB schema.

Configuration:

Memcached::OPT_REMOVE_FAILED_SERVERS = true is enabled in both applications.

Using consistent hashing (Ketama compatible).

Question:

Why does caching stop working when memcached-server-2 is down?

Why don't the applications re-cache the missing data to the remaining available server (memcached-server-1)?

Is this behavior expected? Could this be a bug in the php-memcached extension or libmemcached?

php memcached 3.1.5
libmemcached 1.0.18

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