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

Fixes #36815: Set Redis reconnect_attempts to default #9857

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Oct 10, 2023

From [1] Rails sets this value to 0 rather than relying on the Redis default which results in errors. As [1] indicates:

we need this to be 1 because
Redis connections need to reconnect after a fork so that forked
processes don't use the same socket

[1] https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22704

@ehelms
Copy link
Member Author

ehelms commented Oct 10, 2023

[test katello]

@@ -305,7 +305,14 @@ class Application < Rails::Application
if (rails_cache_settings && rails_cache_settings[:type] == 'redis')
options = [:redis_cache_store]
redis_urls = Array.wrap(rails_cache_settings[:urls])

options << { namespace: 'foreman', url: redis_urls }.merge(rails_cache_settings[:options] || {})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to remove this line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks.

@ekohl ekohl merged commit 2ae0516 into theforeman:develop Oct 17, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants