0

I am using AWS Redis Cluster with Symfony 5.4 https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html. The main use is to have common point for the Symfony Messenger workers running in Kubernetes.

Here is the cache.yaml configuration:

framework:
  cache:
    prefix_seed: 'foo/%kernel.environment%'
    # Redis
    app: cache.adapter.redis
    default_redis_provider: '%env(REDIS_DSN)%'

The value of REDIS_DSN is rediss:default:password@?host[clustercfg.foo.ajwmf1.use1.cache.amazonaws.com:6379], where clustercfg.foo.ajwmf1.use1.cache.amazonaws.com is the configuration endpoint provided by AWS.

The error I get, when running bin/console messenger:stop-workers is 20:00:58 WARNING [cache] Failed to save key "workers.restart_requested_timestamp" of type float: MOVED 1281 np-224-0001-001.foo.ajwmf1.use1.cache.amazonaws.com:6379 ["key" => "workers.restart_requested_timestamp","exception" => RedisException { …},"cache-adapter" => "Symfony\Component\Cache\Adapter\RedisAdapter"]

It look it is trying to redirect the client to a different node?

I have tried playing with the options in the documentation without luck:

  • redis_cluster=1
  • class=\Predis\Client (I am using Predis)
  • auth=password

Any idea what I could be missing?

Thank you!

0 Answers0