-
Notifications
You must be signed in to change notification settings - Fork 27
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 0.2.5
to 0.3.1
hit some "Redlock::LockAcquisitionError" issues
#71
Comments
@jeffbax Same here but my config.redlock_servers = [
RedisClient.new(...)
] |
Spent a good while overhauling Redis/RedisClient pools across our app and no longer seeing this as it's all upgraded now -- the call was inside the house. @bellef FWIW I am using |
@jeffbax I'm curious about what you've done to tackle this as I'm still getting these errors event with the
|
Well YMMV but for us, the main issue was just the amount of things we had accumulated that were attempting to connect to Redis without much oversight.
Our app was not utilizing connection pools well at all, with a range of 130-370+ connections to redis depending on the time of the day and rate at which our Heroku dynos were rebooting (which were to make everything worse, consistently running out of memory and doing it quite often) So I overhauled pooling across our App (as well retooled our dyno sizes) and now connections are more reliably 90-150 (out of 400 allowed) At the same time, I went through all the gem upgrades and made sure as many things that supported RedisClient were correctly doing so and sharing a pool where possible. In addition, I moved what I could to Memcached (with a Redis fallback) - namely Flipper and Rack Attack. Which is all a long winded way of saying "user error" on just letting too many things open new connections rapidly over time and taking our eyes off the ball. We were hitting max Redis connections particularly at 0-downtime app deploy, and seeing errors like that. So I would say that should be your first investigation on whether you're actually in the same situation and maxing out supported connections to Redis. |
Ok thanks a lot for your feedback 🙏 I will look into it. 👀 |
I was getting these errors after upgrading:
Which eventually got be bumbling around to this related issue in the redlock gem: leandromoreira/redlock-rb#124
Even though it is not technically this gem's fault, it might be worth calling out somewhere in the upgrade notes that the
config.redlock_servers
can no longer receive aRedis.new
instance, and now must seem to be aRedisClient.new
instance instead.The text was updated successfully, but these errors were encountered: