-
Notifications
You must be signed in to change notification settings - Fork 81
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
Upgrading from 1.3.2 to 2.0.2, redis-rb gem support #135
Comments
I have a similar issue. We followed the same upgrade path and have complex Redis cluster/sentinel/role/host/port configurations across many environments. I have no idea how to translate all that to RedisClient, and if it can be avoided I'd prefer to stick with the existing configs, which are targeting |
@pboling We ended up monkey patching Still willing to open a PR to address this issue, if the maintainers are open to it. We could have a configuration parameter that, ultimately, determines which error in |
Makes me wonder why Maybe that monkey patch would be another alternative. |
Looking more into the super class structure, it doesn't seem like a good idea to patch the class hierarchy. :( |
Here's a gist of the monkey patch to support |
I have exactly the same problem, and for me it's was because I keep an old config after upgrade gem. I had that: ActiveJob::Uniqueness.configure do |config|
config.on_conflict = :log
config.redlock_servers = [
Redis.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'), ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
]
end And I change |
Hopefully not repeating myself from some other issues, but attempting to do this upgrade for After resolving the following errors:
Then noticed a large connection spike on our Redis instance once it went to prod: With these errors generally starting to pop up.
Ultimately rolling back this gem and Redlock back to 1.3.2 for the moment as I don't have a ton of time to debug at the moment, but figured it was worth sharing (given the OP here mentioned connection pooling concerns) |
Yeah, I did come across this but was hoping to avoid adding a monkey patch. But ty for sharing it. |
FWIW, I have resolved this the right way by upgrading RedisClient and overhauling the app pooling and things seem to be going without a hitch now, although I am using Thanks for your time, appreciate the work on the gem! |
@jeffbax we're running into the exact same problem as you for
ActiveJob::Uniqueness.configure do |config|
config.redlock_servers = [
RedisClient.new(
url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'),
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE },
reconnect_attempts: 1
)
]
end |
@bellef, I am facing the same problem. Did you figure this out? |
Nevermind, figured it out. This comment above fixed it for me |
@sebgrebe I increased |
Thanks, @bellef. I ended doing the same (but to 1) |
Our codebase has some built in redis connection pooling, which utilizes the
redis
gem for connections. I see when you pass a URL, connections are now established withredis-client
.For cases where a user supplies a client, rather than a URL, should
redis
still be supported?The one bump I'm running into is that script registration is occurring by rescuing
RedisClient::CommandError
, whereas the exception with theredis
gem isRedis::CommandError
. If I patch this locally, things seem to be working ok.Is support for
redis
completely dropped? If not, I'm happy to open a PR to rescueRedis::CommandError
in addition toRedisClient::CommandError
.The text was updated successfully, but these errors were encountered: