You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I faced the same situation. According to the Redis gem changelog, Redis is capable of reconnecting automatically after a fork.
I've removed that line and it's working for me.
BTW, use resque 2.4.0 as it fixes the compatibility issues with Redis 5.
Sorry I haven't gotten around to this yet. I'll gladly merge a README PR that provides guidance for both redis ~>4.0 and >5.0. I'll be trusting that the submitter has tested it... which is why I haven't had time to attempt it myself.
For that matter, a PR that adds CI against multiple versions of the redis and resque gems would also be very welcome! (This just prompted me to add #224. 😉)
I think maybe the reconnect suggested as config in README has not been necessary for some time, even well before redis-rb 5.0. Looks like since redis-rb 3.1.0 according to the CHANGELOG GlauberrBatista found. Meaning that whole after_fork config suggested in README is just not needed, maybe?
Same experience for me. Resque workers were no longer starting after update. After removing line Resque.redis.client.reconnect things started working again.
Still have
Resque::Pool.after_prefork do |job|
ActiveRecord::Base.establish_connection
end
The README suggests:
However, in redis 5.x, it appears #reconnect is no longer available, that code raises:
NoMethodError: undefined method 'reconnect' for #<Redis::Client ...
Not sure what the appropriate replacement is, but seems like it's not that....
The text was updated successfully, but these errors were encountered: