channels_redis
channels_redis copied to clipboard
aioredis.errors.ConnectionClosedError: Reader at end of file
The connections drop constantly with this error. totally random(on send or receive event) . even in a test minimal project.
redis=6.0.5 channels-redis=3.0.1 Python=3.8.2
The error is somewhat similar to #214 and #158 but the output is slightly different.
Exception inside application: Reader at end of file
Traceback (most recent call last):
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels/consumer.py", line 58, in __call__
await await_many_dispatch(
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels/utils.py", line 58, in await_many_dispatch
await task
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels/utils.py", line 50, in await_many_dispatch
result = task.result()
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels_redis/core.py", line 452, in receive
message_channel, message = await self.receive_single(
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels_redis/core.py", line 507, in receive_single
content = await self._brpop_with_clean(
File "~/Documents/projects/django/***/venv/lib/python3.8/site-packages/channels_redis/core.py", line 345, in _brpop_with_clean
result = await connection.bzpopmin(channel, timeout=timeout)
aioredis.errors.ConnectionClosedError: Reader at end of file
Seeing the same problem when trying to use channels-redis=3.1.0 in production with Elasticache but its working locally with docker.
Both places are running redis=5.0.6 and Python=3.6.7
I use windows10 and python3.7. At first, port 6379 was occupied. I started redis on other ports and an error occurred. Then I restart the computer and run redis on port 6379. This error disappears.
This looks like a connection issue, rather than anything to do with channels_redis.