Set default reconnect_attempts of Rails.cache to 1
requested to merge 121670-redis-cache-read-error-prevents-cas-users-from-remaining-signed-in into master
What does this MR do?
Set default reconnect_attempts of Rails.cache
to 1
RedisCacheStore
defaults to 0 but 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
This problem was introduced when we switched to RedisCacheStore
because Rails explicitly sets the default to 0. The default value
in the redis client is 1.
Previously we used RedisStore
, and it didn't set any default value. Resulting to the redis client default being used.
Closes #196057 (closed) and #121670 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by James Edwards-Jones