I am having some strange behavior where:
Group('chat-'+ name).send({'text': json.dumps(m)})
fails after performing this send 10 or more times. What is a common reason for this? I do not see any error messages on my worker, other than it does not log that it is sending any information.
Normally I see:
2016-10-29 04:02:37,800 - DEBUG - ws_protocol - Sent WebSocket packet to client for !websocket.send.wTXtcZZQ
This message will not display after a certain number of sends. I am doing some updating behavior where this send will occur every 5 seconds.
EDIT:
This send does not occur in response to a client-send. I am sending server data to the client via this group. I assume this is the issue?
EDIT:
Looking into this more, I found this message on django-channels github here:
https://github.com/django/channels/issues/107
andrewgodwin: "...channels has code to detect when a message gets requeued too many times (it's 10 right now by default) and then it kills it to prevent livelocks..."
Is sending outside of the receive context such as:
Group('chat-'+ name).send({'text': json.dumps(m)})
enqueueing repeatedly?
I was using an old version of django channels. Upgrading to the current version fixed this issue for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.