Skip to content

predis client errors in cluster context #1395

Description

@bradfordcondon

The error

PHP Fatal error:  Uncaught Predis\Response\ServerException: CROSSSLOT Keys in request don't hash to the same slot in predis/predis/src/Client.php:370

We are encountering this with the predis client.

The cause and possible solution

We believe the issue is specifically that migrateExpiredMessages isn't compatible with redis cluster mode. It looks up queue-name:reserved instead of {queue-name}:reserved. We were able to do a hacky workaround by naming all of our queues in {} thus forcing a specific node in the cluster.

https://github.com/php-enqueue/redis/blob/master/RedisConsumerHelperTrait.php#L102

It seems like the configuration options of the enqueue wrapper could more easily support the predis cluster config options.

see also:

#1224

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