I had an error while build a chatroom useing django-channels:

I tried follow the official website: https://channels.readthedocs.io

but while i build a room to chat with many people, an error occered:

Exception inside application: Reader at end of file
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/sessions.py",
 
line 179, in __call__
    return await self.inner(receive, self.send)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/middleware.py",
 
line 41, in coroutine_call
    await inner_instance(receive, send)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/consumer.py",
 
line 59, in __call__
    [receive, self.channel_receive], self.dispatch
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/utils.py",
 
line 52, in await_many_dispatch
    await dispatch(result)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/consumer.py",
 
line 73, in dispatch
    await handler(message)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels/generic/websocket.py",
 
line 196, in websocket_receive
    await self.receive(text_data=message["text"])
  File "/home/lujianxin/Files/PycharmProjects/demo/chat/consumers.py", line 
44, in receive
    'message': message
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/channels_redis/core.py",
 
line 611, in group_send
    key, min=0, max=int(time.time()) - self.group_expiry
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/aioredis/commands/sorted_set.py",
 
line 268, in zremrangebyscore
    return self.execute(b'ZREMRANGEBYSCORE', key, min, max)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/aioredis/commands/__init__.py",
 
line 51, in execute
    return self._pool_or_conn.execute(command, *args, **kwargs)
  File 
"/home/lujianxin/VirtualEnvs/demo/lib/python3.7/site-packages/aioredis/connection.py",
 
line 319, in execute
    raise ConnectionClosedError(msg)
  Reader at end of file
WebSocket DISCONNECT /ws/chat/ljx/ [192.168.2.126:41154]

if i just build a echo server for one connection, it works ok, but while i 
use channels and group_send, it worked ok when i send one or two message, 
all of memeber of the room received message, while i send more the problem 
raising, i promissed that i followed the lesson and my settings, 
environment is ok, but what caused this 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 [email protected].
To post to this group, send email to [email protected].
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/210770a5-b587-486d-840c-56e3deab160a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to