Sidekiq 7 / Redis-client not working (on Heroku)

4.8k Views Asked by At

I am using Sidekiq on an app hosted on Heroku. I have been using the redis gem.

Now I am trying to upgrade to sidekiq 7 which uses redis-client instead of redis. And when doing so I get this error:

redis-client requires Redis 6+ with HELLO command available

The Redis instance I have on Heroku is on the version 6.2.6 (so Redis 6+) (picture attached)

Below my redis.rb file (which is in initializers). I replaced Redis with RedisClient but I still get the error in both cases (in the case where I use the redis gem with Sidekiq 7 and the case where I use redis-client). It means that it is when the Sidekiq inner code is using redis-client that the error is happening.

Any thoughts or ideas would be highly appreciated Thanks in advance!

I was expecting this to work as my Redis instance is on a 6+ version

url = ENV["REDISCLOUD_URL"]

if url
  Sidekiq.configure_server do |config|
    config.redis = { url: url }
  end

  Sidekiq.configure_client do |config|
    config.redis = { url: url }
  end
end

Screenshot of Redis instance

3

There are 3 best solutions below

0
Mike Perham On

Searching the Sidekiq issues for "HELLO" gives you this issue:

https://github.com/sidekiq/sidekiq/issues/5594#issuecomment-1302384905

0
J Nguyen On

You need to upgrade your redis-server (on your machine) to 6+ version. Don't forget to restart it after upgrading.

0
gebonadio On

I had the same problem here in my application. Although the version 6.2.6 is 6+ The error only stopped when I used Redis on version 6.2.12. In staging I am using a "Heroku Data for Redis®* Mini" (with Redis 6.2.12) and it is running normally in Sidekiq 7 In production I am using a "Memetria for Redis®* Mini" (Redis 7)

I don't know if it is possible to choose the version of "Heroku Data for Redis®* Mini" I already had this addon installed in stage.