Search code examples
ruby-on-railsmongodbherokuredissidekiq

redis attempting to connect to local host in Heroku - WHY?


I have been using sidekiq/redis for quite some time with no issues to date.

For some reason, today I am getting this error:

Redis::CannotConnectError - Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED):

So, Redis is attempting to connect to my localhost connection instead of my redis_to_go url in heroku.

My redis.rb file looks like so:

uri = URI.parse(ENV["REDISTOGO_URL"] || "redis://localhost:6379/")
REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)

And when I type heroku config I am given this:

REDISTOGO_URL: redis://redistogo:[email protected]:10280/

which maps exactly to my url that I am seeing in my Redis To Go addon in Heroku.

Nothing changed with Redis that I know of between yesterday when it worked and today when it doesn't, but I did spin up a Mongo DB using Mongo HQ. Perhaps there is a conflict somewhere?

Any help is appreciated.

EDIT

I have no mongo init file, and the only mongo specific file I created was my config/mongoid.yml file. It looks like this:

development:
   sessions:
     default:
       database: mongoid_dev
       hosts:
        - localhost:27017
   options: #strictly 2 spaces before
     raise_not_found_error: false #strictly 4 spaces before not 6
 
 production:
   sessions:
     default:
       uri: <%= ENV['MONGOHQ_URL'] %>
   options: #strictly 2 spaces before
     raise_not_found_error: false #strictly 4 spaces before not 6

I installed Mongo from Master and am running rails 4.1.0.

EDIT2

Full trace error is below:

2014-04-15T20:33:05.068810+00:00 app[web.1]: Redis::CannotConnectError - Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED):
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:290:in `rescue in establish_connection'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:285:in `establish_connection'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:79:in `block in connect'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:257:in `with_reconnect'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:78:in `connect'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:304:in `ensure_connected'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:191:in `block in process'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:270:in `logging'
2014-04-15T20:33:05.068810+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:190:in `process'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:96:in `call'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:186:in `block in info'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in `block in synchronize'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in `synchronize'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/redis-3.0.7/lib/redis.rb:185:in `info'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq/web.rb:218:in `block (2 levels) in <class:Web>'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/connection_pool-2.0.0/lib/connection_pool.rb:58:in `with'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq.rb:69:in `redis'
2014-04-15T20:33:05.069016+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sidekiq-3.0.0/lib/sidekiq/web.rb:218:in `block in <class:Web>'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:133:in `route_eval_with_newrelic'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
2014-04-15T20:33:05.069244+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:116:in `process_route_with_newrelic'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
2014-04-15T20:33:05.069903+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:151:in `dispatch_and_notice_errors_with_newrelic'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:146:in `block in dispatch_with_newrelic'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:335:in `perform_action_with_newrelic_trace'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:143:in `dispatch_with_newrelic'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
2014-04-15T20:33:05.070192+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/error_collector.rb:55:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/browser_monitoring.rb:27:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
2014-04-15T20:33:05.070654+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:71:in `block in call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `each'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:676:in `call'
2014-04-15T20:33:05.070976+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/error_collector.rb:55:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/agent_hooks.rb:32:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/rack/browser_monitoring.rb:27:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-04-15T20:33:05.071462+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/flash.rb:254:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:36:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:82:in `run_callbacks'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-04-15T20:33:05.071665+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:38:in `call_app'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `block in call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-04-15T20:33:05.072148+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/static.rb:64:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:514:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:144:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:572:in `process_client'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:666:in `worker_loop'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22:in `call'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22:in `block (4 levels) in <top (required)>'
2014-04-15T20:33:05.072577+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521:in `spawn_missing_workers'
2014-04-15T20:33:05.073631+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:140:in `start'
2014-04-15T20:33:05.073631+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/unicorn-4.8.2/bin/unicorn:126:in `<top (required)>'
2014-04-15T20:33:05.073631+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
2014-04-15T20:33:05.073631+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'

Solution

  • The issue is with the ENV variable:

    Per sidekiq's documentation:

    RedisToGo can be used with the default REDISTOGO_URL env var in Sidekiq 2.x and earlier (REDISTOGO_URL is supported for legacy reasons, the REDIS_PROVIDER and REDIS_URL vars are recommended).

    You must use the REDIS_PROVIDER or REDIS_URL ENV varibles instead of the REDISTOGO_URL for sidekiq 3 and up. You do not need a sidekiq initializer, and this code will do the trick:

    Run the following from your terminal

    heroku config:set REDIS_PROVIDER=redis://...........