Problem with migration from redis to valkey

Hi community,

we just tried to upgrade our self-hosted speckle server from V 2.23.5 to V 2.25.4, but get “valkey unhealthy” messages on starting with docker-compose and speckle stays unusable.
When reverting the valkey-entries in docker-compose.yml to redis, the server starts correctly.

Where to start debugging?
What can be done to resolve this issue?

Best regards
Bernhard

If you’ve previously had Redis running, ensure there are no port or volume conflicts.

The Valkey container might be marked “unhealthy” if it’s not binding correctly or has resource issues. You can inspect logs with:

docker compose logs valkey

If you can share your docker-compose.yml (or at least the valkey service section), we can take a look at your config.

Let us know what the logs say!


You’ve already identified that reverting to Redis works, and that’s fine in the short term. However, in the longer term, we recommend updating your setup to work with Valkey, as Redis support may be deprecated in future versions.

To add to Jonathon’s response, Valkey is intended to be compatible with Redis so you can continue using Redis for the meantime.

The root cause is probably that the volume used by Redis is incompatible with Valkey.

If you wish to swap Redis for Valkey, then try stopping the Redis container, deleting the Redis volume, then starting Valkey. This should be achievable by approximately following the below steps. As always, we recommend that you back up Postgres database before upgrading or undertaking maintenance on your server.

  1. List the containers, and find the name of the Redis container:

    docker container ls
    
  2. Stop Redis

    docker container stop REPLACE_WITH_YOUR_REDIS_CONTAINER_NAME
    docker container rm REPLACE_WITH_YOUR_REDIS_CONTAINER_NAME
    
  3. Find the Redis volume, it is likely to include the phrase redis_data in the name

    docker volume ls
    
  4. Delete the volume belonging to Redis

    docker volume rm REPLACE_WITH_YOUR_REDIS_VOLUME_NAME
    
  5. Replace the Redis configuration in the docker compose file with Valkey, and start up the docker compose file.

Let us know how you get on,

Iain

Hi Jonathan and iainsproat,
thank you for your hints. Next week I will be able to check them.

If I understand correctly: it is no big problem if the redis database will be deleted and newly created as valkey database.

Btw: is there anything like “maintainance mode” in speckle when I do all these necessary backups and restarts.

Bernhard

Redis is used as an ephemeral store. Any data temporarily stored in it will be recreated after the Speckle server restarts.

Speckle server does not have a maintenance mode state. If you wished, you could change the DNS or ingress configuration to point to a holding page or redirect while maintenance is ongoing.

Iain

1 Like

An alternative way to achieve the same would be to deploy Valkey alongside Redis.

You would have to change the volume name and service name in the docker compose file.

You could then swap the value of the environment variable REDIS_URL to point to the Valkey service instead of the Redis service.

Once you are happy that everything is running ok, you could then remove Redis.

Iain

1 Like