Skip to content

Intermittent OSError: [WinError 121] in logs since upgrading to v1.57.0 #15022

@ghilesmeddour

Description

@ghilesmeddour

Since upgrading to version 1.57.0, I have been intermittently seeing the following error in my logs (roughly once or twice a day).

There is no visible crash or disruption on the UI side, and I haven't been able to find a consistent way to reproduce it. I am also unsure about the actual impact of this error.

data transfer failed
Traceback (most recent call last):
  File ".venv\Lib\site-packages\websockets\legacy\protocol.py", line 940, in transfer_data
    message = await self.read_message()
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv\Lib\site-packages\websockets\legacy\protocol.py", line 1010, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv\Lib\site-packages\websockets\legacy\protocol.py", line 1087, in read_data_frame
    frame = await self.read_frame(max_size)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv\Lib\site-packages\websockets\legacy\protocol.py", line 1144, in read_frame
    frame = await Frame.read(
            ^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    )
    ^
  File ".venv\Lib\site-packages\websockets\legacy\framing.py", line 70, in read
    data = await reader(2)
           ^^^^^^^^^^^^^^^
  File "AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\Lib\asyncio\streams.py", line 769, in readexactly
    await self._wait_for_data('readexactly')
  File "AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\Lib\asyncio\streams.py", line 539, in _wait_for_data
    await self._waiter
  File "AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\Lib\asyncio\proactor_events.py", line 286, in _loop_reading
    length = fut.result()
  File "AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\Lib\asyncio\windows_events.py", line 804, in _poll
    value = callback(transferred, key, ov)
  File "AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\Lib\asyncio\windows_events.py", line 463, in finish_socket_func
    return ov.getresult()
           ~~~~~~~~~~~~^^
OSError: [WinError 121] The semaphore timeout period has expired

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.57.0
  • Python version: 3.14.4
  • Operating System: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:serverRelated to the web serverarea:windowsRelated to Windows compatibilitypriority:P4Low prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedtype:regressionThis bug is a regression from previous behavior

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions