skip to Main Content

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:

  1. Redis::ConnectionError Sidekiq New Issue Connection lost (ECONNRESET)
  2. heroku[router]: at=error code=H13 desc="Connection closed without response"
  3. heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/cable"
  4. ECONNREFUSED

2

Answers


  1. Chosen as BEST ANSWER

    We were able to get it working, and I'm trying now to remember what we did. Some of the possibilities:

    1. We updated redis on Heroku from redis-to-go to actual redis.
    2. We updated the REDIS_URL
    3. We actually fully deleted the entire redis instance, and then created a new one. I believe this is what @spickermann above alluded to.

    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.


  2. I had the same issue and found this thread while looking for a solution. The fix was this in sidekiq.rb:

    Sidekiq.configure_server do |config|
      config.redis = { ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
    end
    
    Sidekiq.configure_client do |config|
      config.redis = { ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
    end
    

    See https://ogirginc.github.io/en/heroku-redis-ssl-error for the discussion.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search