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
Warn on boot if maxmemory policy is not 'noeviction' #4752
Conversation
Test failure on Ruby 2.5 appears to be unrelated. It's a temporal assertion which failed (CI running slow?):
|
@@ -62,6 +62,11 @@ def run(boot_app: true) | |||
ver = Sidekiq.redis_info["redis_version"] | |||
raise "You are connecting to Redis v#{ver}, Sidekiq requires Redis v4.0.0 or greater" if ver < "4" | |||
|
|||
maxmemory_policy = Sidekiq.redis_info["maxmemory_policy"] | |||
if maxmemory_policy != "noeviction" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be a lot of these in development. I'd suggest you only print this if env != "development".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, if it’s the default in the brew formula then I’m ok with it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that the Homebrew formulae don't modify maxmemory_policy
.
Thank you, great idea! |
I have a question about why this warning is necessary when using volatile-* policies: |
This PR proposes logging a warning when the CLI boots if the maxmemory policy is not 'noeviction'.
Inspired by Nate Berkopec's tweet the other day (I've also had clients who had this misconfiguration):