-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading from 8.12 to 8.13.1 produced 500 error due to Redis monitoring throwing NameError #1650
Comments
Thanks for bringing this to our attention, @mbsmartee What versions of the following gems are you running:
Are you using Sidekiq or another gem with a dependency on Redis? Does this error also occur if you try to perform an operation directly on your Redis client? Example: redis = Redis.new
redis.get("foo") |
7.0.4
Redis 6 I believe, it is the latest Heroku Redis.
Redis Objects.
It happens in the running Rails app and can be reproduced in the Rails console. I'm able to work around the issue by setting NEW_RELIC_AGENT_ENABLED to With the agent enabled I'm clearing connecting:
But if I try to grab keys it errors out:
|
If I disable New Relic, I'm able to grab the keys, no problem:
|
Thanks for the additional context, @mbsmartee. We're still trying to reproduce this locally. Since the error seems to be related to Redis instrumentation, you can disable the instrumentation while we look for a solution and continue to run New Relic for all other parts of your app. To disable the instrumentation, update your instrumentation.redis: disabled If you're using environment variables, you can pass this instead:
|
@mbsmartee, would you be willing to share how you're configuring Redis in your For example, the We're having trouble reproducing the issue and want to get as close to your environment as we can. |
Also, could you provide a longer stack trace? We'd love to understand more about how the call to |
@kaylareopelle If it helps, I'm getting the same error as mbsmartee, but in the context of action cable.
We're using redis 5.0.5 (with a redis server 3.2.X) and rails 7.0.4. We only have this configuration related to redis:
Disabling redis instrumentation, as you suggested, correctly works around the issue. |
Thanks for sharing your experience, @patatepartie. Glad to hear turning off the instrumentation helps workaround the problem. We'll try to reproduce the bug using Action Cable and get back to you with more information. |
@mbsmartee @patatepartie Hi there. We've been able to reproduce the problem when using When convenient, would you please try upgrading to If you're able to confirm that the problem is fixed with |
@mbsmartee @patatepartie We have prepped #1673 as a compatibility fix between In addition to upgrading your apps to use |
I tried independently upgrading Thanks @fallwith! |
Hi @mbsmartee @patatepartie. The fix has now been released in v8.14.0 of the
Both of you have been officially recognized in our CHANGELOG. Thanks again for bringing this issue to our attention! |
^^ Provide a general summary of the issue in the title above. ^^
After upgrading from version 8.12 to version 8.13.1 of newrelic_rpm we began getting a 500 error due to the Redis monitoring component of the New Relic agent not finding "client".
Description
newrelic_rpm breaking Rails app on Heroku using Redis because of NameError
This shows up in the Rails Console when trying to access the Rails cache in an app using the Redis cache.
NameError (undefined local variable or method
client' for RedisClient::Middlewares:Module`Expected Behavior
It is expected that it will working normally and not break the app.
Troubleshooting or NR Diag results
Provide any other relevant log data.
TIP: Scrub logs and diagnostic information for sensitive information
Steps to Reproduce
Using newrelic_rpm 8.13.1, open a Rails console where the New Relic agent is enabled and the 8.13.1 version of the newrelic_rpm is being used.
In the Rails console, try to access the keys in the Rails cache with Rails.cache.redis.keys
What should happen is that a listing of keys returns. What happens instead is that there is a NameError.
This can be fixed by disabling the agent or reverting to the 8.12 versions.
Your Environment
Ruby 3.12, newrelic_rpm 8.13.1
Additional context
N/A
For Maintainers Only or Hero Triaging this bug
Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):
The text was updated successfully, but these errors were encountered: