Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x7f25014d3810>; the handler is closed #1138

Closed
garima-trivedi opened this issue Mar 3, 2022 · 3 comments
Labels

Comments

@garima-trivedi
Copy link

After upgrading to websockets==10.2 (latest uvicorn release 0.17.5)

It seems something changed here: f605e86 related to closing the connection, and the line numbers in my sentry reports agree.
uvicorn.error:244 closing handshake failed

Traceback (most recent call last):

File "/home/appuser/.local/lib/python3.9/site-packages/websockets/legacy/server.py", line 240, in handler
await self.close()
File "/home/appuser/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 779, in close
await asyncio.shield(self.close_connection_task)
File "/home/appuser/.local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 1312, in close_connection
self.transport.write_eof()
File "uvloop/handles/stream.pyx", line 696, in uvloop.loop.UVStream.write_eof
File "uvloop/handles/handle.pyx", line 159, in uvloop.loop.UVHandle._ensure_alive
RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x55f7ecebc570>; the handler is closed

I'm not sure if websockets library or uvicorn is the culprit here ?

@rslinckx
Copy link

rslinckx commented Mar 4, 2022

Can confirm that reverting to 10.1 fixes the issue for us with the latest uvicorn release

@Catastropha
Copy link

Yes, this same issue was fixed with 10.1
Now it's reintroduced with 10.2

@aaugustin aaugustin added the bug label Mar 10, 2022
@ngnpope
Copy link

ngnpope commented Apr 4, 2022

This is a duplicate of #1072.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants