Client.close raises StreamClosedError
See original GitHub issueAppears the running Client.close
consistently runs into some sort of hang up (shown below). This happens in Distributed 1.21.8, but not in Distributed 1.21.6. Context for this provided in the linked Gist, which contains the Jupyter Notebook it showed up in and the environment.
Exception ignored in: <generator object add_client at 0x11e4d1f10>
RuntimeError: generator ignored GeneratorExit
Future exception was never retrieved
future: <Future finished exception=CommClosedError('in <closed TCP>: Stream is closed',)>
Traceback (most recent call last):
File "/zopt/conda2/envs/test/lib/python3.6/site-packages/distributed/comm/tcp.py", line 179, in read
n_frames = yield stream.read_bytes(8)
File "/zopt/conda2/envs/test/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/zopt/conda2/envs/test/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/zopt/conda2/envs/test/lib/python3.6/site-packages/distributed/comm/tcp.py", line 200, in read
convert_stream_closed_error(self, e)
File "/zopt/conda2/envs/test/lib/python3.6/site-packages/distributed/comm/tcp.py", line 128, in convert_stream_closed_error
raise CommClosedError("in %s: %s" % (obj, exc))
distributed.comm.core.CommClosedError: in <closed TCP>: Stream is closed
ref: https://gist.github.com/jakirkham/b9c75e2f7fabdee5f19db8cc3bff0d9e ref: https://github.com/dask/distributed/issues/1963
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Tornado raises StreamClosedError: Stream is closed
I have had same issue. It can occur when you set minsize (for asyncmc.Client) more than 1 and when some connections into ConnectionPool...
Read more >tornado.iostream 源代码
[文档]class StreamClosedError(IOError): """Exception raised by `IOStream` methods when the stream is closed. Note that the close callback is scheduled to ...
Read more >rosbridge_server: websocket_handler.py Source File
45 from tornado.iostream import StreamClosedError ... 67 raise. 68 return wrapper ... 138 rospy.logwarn("Client %d did not authenticate. Closing connection.
Read more >Source code for h2.connection - python-hyper
CLOSED raise ProtocolError( "Invalid input %s in state %s" % (input_, ... When called on a client connection, this method will return a...
Read more >'Stream is closed' crashing the tornado process - Google Groups
raise IOError("Stream is closed") IOError: Stream is closed. It seems like the flash client is disconnection (on_close()) but then
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jakirkham I can see your concern – I definitely don’t want to convolute two issues. However, I think this is the same problem. My example simply uses the context manager for the
Client
, whose__exit__
just callsClient.close
, which is what triggers the exception. This leads me to believe this is the same issue, and hence, that my comment should remain here and not be filed as another issue.Im facing this problem with
distributed==2022.9.1
and dask. Any workaround I can emply to silence these errors after callingclient.gather
successfully?