taxicab33
@taxicab33
Django веб-разработчик

Появляются ошибки asyncio и redis «RuntimeError: Event loop is closed» который использует Django, что делать?

Начали появляться ошибки, связанные с соединением, раньше не было. gunicorn, nginx, postgres, daphne запускаются, и нормально работают.
Task exception was never retrieved
django_1       | future: <Task finished name='Task-5' coro=<Connection.disconnect() done, defined at /usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py:819> exception=RuntimeError('Event loop i
s closed')>
django_1       | Traceback (most recent call last):
django_1       |   File "/usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py", line 828, in disconnect
django_1       |     self._writer.close()  # type: ignore[union-attr]
django_1       |   File "/usr/local/lib/python3.9/asyncio/streams.py", line 353, in close
django_1       |     return self._transport.close()
django_1       |   File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 698, in close
django_1       |     self._loop.call_soon(self._call_connection_lost, None)
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 751, in call_soon
django_1       |     self._check_closed()
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 515, in _check_closed
django_1       |     raise RuntimeError('Event loop is closed')
django_1       | RuntimeError: Event loop is closed
django_1       | Task exception was never retrieved
django_1       | future: <Task finished name='Task-9' coro=<Connection.disconnect() done, defined at /usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py:819> exception=RuntimeError('Event loop i
s closed')>
django_1       | Traceback (most recent call last):
django_1       |   File "/usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py", line 828, in disconnect
django_1       |     self._writer.close()  # type: ignore[union-attr]
django_1       |   File "/usr/local/lib/python3.9/asyncio/streams.py", line 353, in close
django_1       |     return self._transport.close()
django_1       |   File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 698, in close
django_1       |     self._loop.call_soon(self._call_connection_lost, None)
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 751, in call_soon
django_1       |     self._check_closed()
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 515, in _check_closed
django_1       |     raise RuntimeError('Event loop is closed')
django_1       | RuntimeError: Event loop is closed
django_1       | Task exception was never retrieved
django_1       | future: <Task finished name='Task-13' coro=<Connection.disconnect() done, defined at /usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py:819> exception=RuntimeError('Event loop
is closed')>
django_1       | Traceback (most recent call last):
django_1       |   File "/usr/local/lib/python3.9/site-packages/redis/asyncio/connection.py", line 828, in disconnect
django_1       |     self._writer.close()  # type: ignore[union-attr]
django_1       |   File "/usr/local/lib/python3.9/asyncio/streams.py", line 353, in close
django_1       |     return self._transport.close()
django_1       |   File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 698, in close
django_1       |     self._loop.call_soon(self._call_connection_lost, None)
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 751, in call_soon
django_1       |     self._check_closed()
django_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 515, in _check_closed
django_1       |     raise RuntimeError('Event loop is closed')
django_1       | RuntimeError: Event loop is closed
  • Вопрос задан
  • 53 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы