Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedisClient::CommandError on retry #72

Open
bellef opened this issue Feb 19, 2024 · 0 comments
Open

RedisClient::CommandError on retry #72

bellef opened this issue Feb 19, 2024 · 0 comments

Comments

@bellef
Copy link

bellef commented Feb 19, 2024

Hi and first of all thank you for your hard work on this gem! ❤️

My problem

I'm having trouble retrying jobs using sidekiq UI. Whenever I navigate to /sidekiq/retries and click on Retry Now, I get a 500 with the following:

Screenshot 2024-02-19 at 14 58 47

So it's a RedisClient::CommandError with the message "ERR syntax error".
If I set a breakpoint before the command is sent, here is what's going on:

["SCAN", "0", "0", "match", "activejob_uniqueness:path/to/job:3aa7381f4be2b444874cacf24f6c5c9e*"]

And it's coming from:

redis-client (0.20.0) lib/redis_client/connection_mixin.rb:35:in `call'
redis-client (0.20.0) lib/redis_client.rb:257:in `block (2 levels) in call'
redis-client (0.20.0) lib/redis_client/middlewares.rb:16:in `call'
redis-client (0.20.0) lib/redis_client.rb:256:in `block in call'
redis-client (0.20.0) lib/redis_client.rb:677:in `ensure_connected'
redis-client (0.20.0) lib/redis_client.rb:255:in `call'
redis-client (0.20.0) lib/redis_client.rb:639:in `scan_list'
redis-client (0.20.0) lib/redis_client.rb:359:in `scan'
activejob-uniqueness (0.3.1) lib/active_job/uniqueness/lock_manager.rb:28:in `each'
activejob-uniqueness (0.3.1) lib/active_job/uniqueness/lock_manager.rb:28:in `block (2 levels) in delete_locks'
[...]

Which is the following line:

conn.scan(0, match: wildcard).each { |key| conn.call('DEL', key) }

What am I missing? (I'm pretty sure it's kind of obvious so apologies if it is).
Thank you in advance for your help 🙏

Config

activejob-uniqueness (0.3.1)
redlock (2.0.6)
redis-client (0.20.0)
# config/initializers/active_job_uniqueness.rb
ActiveJob::Uniqueness.configure do |config|
  config.on_conflict = :log
  config.redlock_servers = [RedisClient.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'), ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant