• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Websocket unhandeled exception

     
    • 0 Vote(s) - 0 Average

    Websocket unhandeled exception

    Websocket unhandeled exception crashing my server
    washedup
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Dec
    Reputation: 0
    Country:Norway
    #1
    2024-12-05, 10:38 PM
    I keep getting this error intermittently, sometimes it can take days for it to crash my server again but it won't stop.
    Apparently it's trying to access a disposed object? Maybe a websocket that doesn't exist anymore?

    Jellyfin version: 10.10.3 (Although this has been happening on the previous versions aswell)
    Platform: Unraid 6.12.13 using the official jellyfin image
    Clients used: Chrome, Jellyfin Android app

    Code:
    Unhandled exception. System.OperationCanceledException: The operation was canceled.
    ---> System.ObjectDisposedException: Cannot access a disposed object.
    Object name: 'System.Net.WebSockets.WebSocket'.
      at System.Net.WebSockets.ManagedWebSocket.WriteFrameToSendBuffer(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlySpan`1 payloadBuffer)
      at System.Net.WebSockets.ManagedWebSocket.SendFrameFallbackAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, Task lockTask, CancellationToken cancellationToken)
      --- End of inner exception stack trace ---
      at System.Net.WebSockets.ManagedWebSocket.SendFrameFallbackAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, Task lockTask, CancellationToken cancellationToken)
      at Emby.Server.Implementations.Session.SessionWebSocketListener.KeepAliveSockets(Object o, EventArgs e)
      at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
      at System.Threading.QueueUserWorkItemCallback.Execute()
      at System.Threading.ThreadPoolWorkQueue.Dispatch()
      at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    Object name: 'System.Net.WebSockets.WebSocket'.
      at System.Net.WebSockets.ManagedWebSocket.WriteFrameToSendBuffer(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlySpan`1 payloadBuffer)
      at System.Net.WebSockets.ManagedWebSocket.SendFrameFallbackAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, Task lockTask, CancellationToken cancellationToken)
      --- End of inner exception stack trace ---
      at System.Net.WebSockets.ManagedWebSocket.SendFrameFallbackAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, Task lockTask, CancellationToken cancellationToken)
      at Emby.Server.Implementations.Session.SessionWebSocketListener.KeepAliveSockets(Object o, EventArgs e)
      at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
      at System.Threading.QueueUserWorkItemCallback.Execute()
      at System.Threading.ThreadPoolWorkQueue.Dispatch()
      at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 11,852
    Threads: 10
    Joined: 2023 Jun
    Reputation: 347
    Country:United States
    #2
    2024-12-05, 10:56 PM (This post was last modified: 2024-12-05, 10:56 PM by TheDreadPirate.)
    I've seen a few other users with this issue, but I've never been able to reproduce on my unRAID test setup.

    My best guess is that this is some sort of race condition. There is a github issue for a similar problem, but not much progress has been made due to the difficulty in reproducing it.

    https://github.com/jellyfin/jellyfin/issues/12090

    What kind of storage is the Jellyfin container running off of? SSD or HDD? Specifically where /config is mounted.
    Jellyfin 10.10.3 (Docker)
    Ubuntu 24.04 LTS 
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        3x WD Red Pro 6TB CMR in RAIDZ1 (JF Library)
    [Image: GitHub%20Sponsors-grey?logo=github]
    washedup
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Dec
    Reputation: 0
    Country:Norway
    #3
    2024-12-05, 11:11 PM
    (2024-12-05, 10:56 PM)TheDreadPirate Wrote: I've seen a few other users with this issue, but I've never been able to reproduce on my unRAID test setup.

    My best guess is that this is some sort of race condition.  There is a github issue for a similar problem, but not much progress has been made due to the difficulty in reproducing it.

    https://github.com/jellyfin/jellyfin/issues/12090

    What kind of storage is the Jellyfin container running off of?  SSD or HDD?  Specifically where /config is mounted.

    It's located in the appdata share in Unraid which should be running of a 500gb NVME SSD.
    This is how the share is configured: https://i.imgur.com/nCuTa2z.png
    Pretty new to Unraid so it could be I'm doing something wrong with the shares maybe.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 11,852
    Threads: 10
    Joined: 2023 Jun
    Reputation: 347
    Country:United States
    #4
    2024-12-06, 02:09 PM (This post was last modified: 2024-12-06, 02:10 PM by TheDreadPirate. Edited 1 time in total.)
    My unRAID setup is for testing only and doesn't have much going on. Just a single SATA SSD to write docker data to, so I don't have many of those options and can't comment if they are "right" or not.

    For testing, are you able to create a "Share" that is "simple"? No movers, no caching, just a simple storage pool for docker to write data to? Preferably not ZFS or BTRFS.
    Jellyfin 10.10.3 (Docker)
    Ubuntu 24.04 LTS 
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        3x WD Red Pro 6TB CMR in RAIDZ1 (JF Library)
    [Image: GitHub%20Sponsors-grey?logo=github]
    washedup
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Dec
    Reputation: 0
    Country:Norway
    #5
    2024-12-06, 08:08 PM
    (2024-12-06, 02:09 PM)TheDreadPirate Wrote: My unRAID setup is for testing only and doesn't have much going on.  Just a single SATA SSD to write docker data to, so I don't have many of those options and can't comment if they are "right" or not.

    For testing, are you able to create a "Share" that is "simple"?  No movers, no caching, just a simple storage pool for docker to write data to?  Preferably not ZFS or BTRFS.

    I'll try that and report back if the crashes persist, thanks for helping!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode