Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Issues with New Relic and Sidekiq in Heroku

rails
heroku
ruby

#1

###Ruby Question Template

  • What language agent version are you using? Any other relevant versions? (Gems, etc.)

Ruby v2.3

gem ‘rails’, ‘~> 5.0.1’
gem ‘newrelic_rpm’, ‘5.3.0.346’
gem ‘sidekiq’, ‘~> 5.1.1’

  • Describe your issue: what are you seeing? What were you expecting to see?

I use sidekiq as my background job processor on rails through ActiveJob. When I have NEW_RELIC_AGENT_ENABLED=true, all of my jobs are enqueued by my web dyno instead of my worker dyno. None of my jobs go through sidekiq (they should).

When I set NEW_RELIC_AGENT_ENABLED=false as a environment variable, everything is back to normal. Something with New Relic’s agent is screwing up how my app is enqueueing background jobs. I’ve also noticed that I have to prepend NEW_RELIC_AGENT_ENABLED=false with my rake tasks as well for the jobs to process.

I’ve also tried disabling the agent only on my sidekiq instance but it doesn’t work:

web: bundle exec puma -C config/puma.rb release: bundle exec rails db:migrate worker: NEW_RELIC_AGENT_ENABLED=false bundle exec sidekiq -C config/sidekiq.yml -e production

I love New Relic, but obviously this makes it impossible to use. Has anyone seen this issue? I’m happy to give more information.


#2

Thanks for bringing this up, @stephen.arifin . We have opened a support ticket with you and will try to update here with the results from that. :+1: