You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
I have a Django application using Django Channels, and I'm observing many errors in Datadog related to the Redis BZPOPMIN command. Does anyone have any ideas why I might be receiving these errors, how to avoid them, and what consequences might be associated with them?
About app:
I'm using a socket connection for real-time updates between the frontend and backend. So, nothing special is happening. The socket connection is established, and the frontend is receiving messages from the backend, and vice versa. The mobile client has the same behavior
I'm using an AWS Network Load Balancer that redirects connections to a Daphne instance directly. I'm using AWS ElastiCache with a powerful instance. I noticed in the documentation that the library was tested with Redis, not with AWS ElastiCache specifically. So, I tried a self-hosted Redis instance. However, the error in the logs didn't disappear.
Logs
I also noticed that the latency increases when I try to simulate many connections.
Questions:
How critical are these errors? Perhaps I missed some settings? How to avoid them? Sometimes, I see in the logs that clients can't connect or reconnect, with status codes 1006 and 403 (Forbidden). Could these connection/reconnection issues with the status codes be related to the BZPOPMIN errors?
I've tried RedisPubSubChannelLayer. With this layer, I don't see any errors (as it uses different Redis commands). I also observed that the latency is lower compared to RedisChannelLayer. However, the documentation states that RedisPubSubChannelLayer is in beta. How safe is it to use in production? Furthermore, since RedisPubSubChannelLayer uses different Redis commands, will the behavior be the same if we use this layer in production? I'm particularly concerned about message ordering, persistent connections, and so on. What are the recommended use cases for this layer?
Thank you in advance for your help or any ideas you might have.
The text was updated successfully, but these errors were encountered:
Hey!
I have a Django application using Django Channels, and I'm observing many errors in Datadog related to the Redis
BZPOPMIN
command. Does anyone have any ideas why I might be receiving these errors, how to avoid them, and what consequences might be associated with them?About app:
I'm using a socket connection for real-time updates between the frontend and backend. So, nothing special is happening. The socket connection is established, and the frontend is receiving messages from the backend, and vice versa. The mobile client has the same behavior
Current Setup:
In settings.py:
I start daphne with command:
Infrastructure:
I'm using an AWS Network Load Balancer that redirects connections to a Daphne instance directly. I'm using AWS ElastiCache with a powerful instance. I noticed in the documentation that the library was tested with Redis, not with AWS ElastiCache specifically. So, I tried a self-hosted Redis instance. However, the error in the logs didn't disappear.
Logs
I also noticed that the latency increases when I try to simulate many connections.
Questions:
RedisPubSubChannelLayer
. With this layer, I don't see any errors (as it uses different Redis commands). I also observed that the latency is lower compared to RedisChannelLayer. However, the documentation states that RedisPubSubChannelLayer is in beta. How safe is it to use in production? Furthermore, since RedisPubSubChannelLayer uses different Redis commands, will the behavior be the same if we use this layer in production? I'm particularly concerned about message ordering, persistent connections, and so on. What are the recommended use cases for this layer?Thank you in advance for your help or any ideas you might have.
The text was updated successfully, but these errors were encountered: