Skip to content

Commit

Permalink
fix(redis): Timeout error on unique jobs (#2291)
Browse files Browse the repository at this point in the history
## Context

- We often have an error message about redis timeout (0.1 seconds)
- After investigation, its coming from the uniqueness job configuration

## Description

- Update the `redis_timeout` value to the same as redis, `5 second` .
It's a lot but it will cover cases where redis can be slower (self
hosted).


getlago/lago#188 (comment)
  • Loading branch information
jdenquin committed Jul 16, 2024
1 parent a5c66b0 commit 1f9e3ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/initializers/active_job_uniqueness.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
end

config.redlock_servers = ["#{uri.scheme}://:#{ENV["REDIS_PASSWORD"]}@#{host}:#{uri.port}"]
config.redlock_options = {
retry_count: 0,
redis_timeout: 5
}
end
end

0 comments on commit 1f9e3ea

Please sign in to comment.