FYI: New Relic Python instrumentation breaks the PubSub layer with async consumers
drewbrew opened this issue · comments
Drew Winstel commented
There's nothing you can or should do here, but I just wanted to bring this bug to your attention (and anyone who may be googling why a 'coroutine' object has no attribute 'subscribed'
: newrelic/newrelic-python-agent#818
TLDR with this setup:
- New Relic agent 8.6.0 to 8.8.0
- Channels configured to use the Redis PubSub backend for the channel layer
- Async consumers
- Daphne serving websockets behind nginx
When you try to connect to the websocket, the client gets disconnected immediately because of an AttributeError
in _do_receiving()
at the lookup to self._pubsub.subscribed
.
The workaround is to downgrade the New Relic agent to 8.5.0.
Carlton Gibson commented
Thanks for the post @drewbrew. That'll save a few folks a few cycles no doubt 👍