Streamlit version: 1.54.0
Python version: 3.12
Running locally on the official Jetson Orin Nano 8GB Super Developer kit
Using Streamlit as a real-time GUI. (No CPU/GPU bottleneck issues)
The GUI works great for around an hour and then suddenly the error below occurs:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/tornado/websocket.py", line 1115, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
Task exception was never retrieved
future: <Task finished name='Task-43110' coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /usr/local/lib/python3.12/dist-packages/tornado/websocket.py:1111> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/tornado/websocket.py", line 1113, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
I’m at a loss what might cause this intermittent issue.
When reading what caused this for other users (large file sizes), I suspect that this is something else.
Hey, thanks for sharing all those details and welcome to the community! This WebSocketClosedError is a common issue in Streamlit apps and usually points to the WebSocket connection between the browser and the Streamlit server being unexpectedly closed. This can be caused by network interruptions, reverse proxy/firewall timeouts, or even large data transfers that exceed message size limits. Since you’re running locally and not seeing CPU/GPU bottlenecks, it’s less likely to be a resource issue, but could still be related to network stack timeouts or message size.