Jellyfin Forum
Websocket unhandeled exception - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Websocket unhandeled exception (/t-websocket-unhandeled-exception)



Websocket unhandeled exception - washedup - 2024-12-05

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()



RE: Websocket unhandeled exception - TheDreadPirate - 2024-12-05

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.


RE: Websocket unhandeled exception - washedup - 2024-12-05

(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.


RE: Websocket unhandeled exception - TheDreadPirate - 2024-12-06

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.


RE: Websocket unhandeled exception - washedup - 2024-12-06

(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!