You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RuntimeError: set changed size during iteration #496
Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: not able to test
Does uvloop behave differently from vanilla asyncio? How?: not able to test
I run a fastapi application with uvicorn, and I occassionally receive the following error:
Traceback (most recent call last):
File "uvloop/cbhandles.pyx", line 66, in uvloop.loop.Handle._run
File "uvloop/loop.pyx", line 473, in uvloop.loop.Loop._on_idle
File "uvloop/loop.pyx", line 649, in uvloop.loop.Loop._exec_queued_writes
RuntimeError: set changed size during iteration
This seems to only happen in a production environment and I don't have the resources to examine it further. However, it seems that the code in the uvloop master branch is different, so maybe the error has been fixed already.
Thanks for the report! I can reproduce this issue, and it is a bug that sometimes happens when writing to another transport in the resume_writing() handler. I'll try to fix it and include the fix in the next release.
Activity
fantix commentedon Sep 13, 2022
Thanks for the report! I can reproduce this issue, and it is a bug that sometimes happens when writing to another transport in the
resume_writing()handler. I'll try to fix it and include the fix in the next release.bugfix: write to another transport in resume_writing() fails
bugfix: write to another transport in resume_writing() fails (#498)
janbuchar commentedon Sep 14, 2022
Thank you @fantix for resolving this so fast!