We are a not for profit social media community. We upgraded from the free Heroku Redis plan to the lowest tier paid Heroku Redis plan. Instead of improving performance, the site crashed. And it’s still down.
We got some help with the SSL issue, and updated sidekiq.rb and actioncable.yml (see below) but now redis can’t connect to actioncable, and we’re getting a slew of errors about not being able to connect.
Here is our sidekiq.rb
Sidekiq.default_worker_options = {
backtrace: true,
retry: true
}
sidekiq_redis = lambda do
Redis.new(url: ENV['REDIS_URL'], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
end
Sidekiq.configure_client do |config|
config.redis = ConnectionPool.new(size: 2, &sidekiq_redis)
end
Sidekiq.configure_server do |config|
config.redis = ConnectionPool.new(size: 17, &sidekiq_redis)
end
Sidekiq::Extensions.enable_delay!
Our cable.yml
development:
adapter: redis
url: redis://localhost:6379/1
test:
adapter: async
production:
adapter: redis
url: <%= ENV['REDIS_URL'] %>
ssl_params:
verify_mode: <%= OpenSSL::SSL::VERIFY_NONE %>
We are using the Heroku Redis $15/month plan now. As soon as we upgraded, the site crashed. Someone helped us update the sidekiq.rb and actioncable.yml, but the site still doesn’t work.
Among other errors:
- Redis::ConnectionError Sidekiq New Issue Connection lost (ECONNRESET)
- heroku[router]: at=error code=H13 desc="Connection closed without response"
- heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/cable"
- ECONNREFUSED
2
Answers
We were able to get it working, and I'm trying now to remember what we did. Some of the possibilities:
Eventually, one of those solutions ended up working. I regret it's been so long that I cannot say with certainty, but... I am almost certain it is related to 2 and 3 above.
I had the same issue and found this thread while looking for a solution. The fix was this in sidekiq.rb:
See https://ogirginc.github.io/en/heroku-redis-ssl-error for the discussion.