installed packages:

channels==2.1.3
asgiref==2.3.2
channelsmultiplexer==0.0.2
chanels-redis==2.3.0
django==2.0.8

from channels.layers import get_channel_layer
from asgiref.sync import async_to_sync as a2s
cl = get_channel_layer()

class Yyy:
   def tt(self, z):
       for x in range(0, z):
           print(x)
           a2s(cl.group_send)('group_name', {'type': 'group.method', 
'content': 'data'})

y = Yyy()
y.tt(1000)



monitor on redis server clients count, it increases 1000 clients, waiting 
for a long time, connections still stay there
keep sending message outside consumer
finally, the redis server will raise MaxClients error


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ea00f813-0a6a-479b-a40b-c4d4cefa85fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to