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

Redlock::LockAcquisitionError #77

Open
casiodk opened this issue Jun 13, 2024 · 3 comments
Open

Redlock::LockAcquisitionError #77

casiodk opened this issue Jun 13, 2024 · 3 comments

Comments

@casiodk
Copy link

casiodk commented Jun 13, 2024

I am getting this error when running my specs

Redlock::LockAcquisitionError:
failed to acquire lock on 'Too many Redis errors prevented lock acquisition:
RedisClient::CommandError: NOSCRIPT No matching script. Please use EVAL. (redis://redis:6379/3)'

Everything works fine in development mode. Any ideas what the issue might be?

@sebgrebe
Copy link

@casiodk, we are having the same issue. Did you find a solution?

@casiodk
Copy link
Author

casiodk commented Aug 23, 2024

I did this

::RSpec.configure do |config|
  include ActiveJob::TestHelper

  config.around(:each, active_job: :perform) do |example|
    perform_enqueued_jobs do
      example.run
    end
  end

  ActiveJob::Uniqueness.test_mode!
end

https://github.com/veeqo/activejob-uniqueness?tab=readme-ov-file#test-mode

@sebgrebe
Copy link

I did this

::RSpec.configure do |config|
  include ActiveJob::TestHelper

  config.around(:each, active_job: :perform) do |example|
    perform_enqueued_jobs do
      example.run
    end
  end

  ActiveJob::Uniqueness.test_mode!
end

https://github.com/veeqo/activejob-uniqueness?tab=readme-ov-file#test-mode

Ah, sorry, I read too quickly, I am having this problem in production. Seems to be linked to leandromoreira/redlock-rb#135

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

2 participants