ohm: Infrequent and weird # in heroku/rediscloud environment

Hi guys,

ohm has been working great (still using version 2.3) in my Sinatra app for years.

But I’m seeing some weird periodic error in a heroku environment. I already opened a ticket with heroku, but they have no idea at the moment, other than switching to a different redis client.

My app uses the Redis Cloud heroku addon. The app does a redis fetch for every request it gets. Redis Cloud has also been working great for months. I have the REDIS config var set for heroku. The app reads it via ENV to get the redis config url. There is only a single place in the code where the redis config gets set:

Ohm.redis = Redic.new(ENV['REDIS'])

But I’m seeing daily errors from my app. The error occurs only after, before or during the heroku daily dyno restart. So only once per day!

NoMethodError: undefined method `each' for #<RuntimeError: NOAUTH Authentication required>
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 144 in block in fetch
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 699 in synchronize
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 699 in synchronize
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 143 in fetch
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 457 in sort
File "/app/vendor/bundle/ruby/2.3.0/gems/ohm-2.3.0/lib/ohm.rb" line 498 in first

I would appreciate any ideas or hints for debugging or resolving this issue. Thanks.

Christian

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 42 (21 by maintainers)

Most upvoted comments

Thank you @soveran, I will keep you posted.