Jellyfin Forum
Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - 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: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task (/t-server-becomes-unresponsive-after-a-while-during-ffmpeg-attachmentextractor-task)

Pages: 1 2


Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-05

This is a follow up to this issue I thought was resolved but seems to be back: https://forum.jellyfin.org/t-solved-server-becomes-unresponsive-when-transcoding-for-my-phone (ignore the "for my phone" part; I've since narrowed this further to all web).

This seems to kind of randomly occur when playing content with SSA/ASS subtitles from the web or web-wrapper apps like Android. Around midway through playback, it just freezes and the server becomes almost completely unresponsive until I restart the docker container.

In the instances I've seen, the server has been either transcoding for reason "container not supported" or remuxing (which I thought was the same thing but that's what the server says).

I always see it occur after first MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder, then MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor task. I took a look at the classes and with my very limited understanding, it seems to be related to extracting the SSA subtitles? That would track with all the occurrences of this I've seen.

https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.MediaEncoding/Attachments/AttachmentExtractor.cs

Here's the full log:
https://pastebin.com/Nk6ZFHSR

Server and web are 10.10.1.

Here's the compose:


  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    ports:
      - 8096:8096
    group_add:
      - "109" # render group
      - "44" # video group
    devices:
      - /dev/driConfused-facedev/dri
    volumes:
      - type: bind
        source: /services/jellyfin/jellyfin/jellyfin-web/config.json
        target: /jellyfin/jellyfin-web/config.json
      - /services/jellyfin/configConfused-faceconfig
      - /services/jellyfin/cacheConfused-facecache
      - /mnt/mediaConfused-facemedia
    restart: always
    environment:
      - TZ=America/New_York
      - JELLYFIN_PublishedServerUrl=https://jellyfin.xxxx
    logging:
      driver: "json-file"
      options:
        max-file: "10"
        max-size: "200k"



RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - TheDreadPirate - 2024-11-05

What are the specs of the server? It looks like it is extracting the subs, dumping the attachments, then remuxing. So, other than disk space, it should be a pretty light load on the server.


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-05

Ubuntu 24.04 on a Proxmox VM

24GB RAM
12 vCPUs assigned to the VM.
GPU is the UHD 770 iGPU in my Intel 13th gen CPU.

Agreed it should be very light. It handles everything else very fast. This one particular task just seems to choke it.

One little thing I changed since posting this is I set user: "1000:1000" in the compose file since the config directory had some mixed permissions between root and the 1000 user. It's writing these extracted attachments to config so.. :shrug:


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - TheDreadPirate - 2024-11-05

If you changed the container's runtime user, make sure you recursively chown /config.

Please update us whether or not that was the fix.


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-07

Issue is still occuring. I just reproduced.

The video was remuxing this time.
The permissions were all changed to the 1000 user, and the render and video groups were corrected as they were previously wrong (thanks again for your help on Discord)

https://pastebin.com/J0RUhATP


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-07

Just to reiterate that this seems kind of random; I just watched the following episode from the one above and didn't experience the issue. In this case the AttachmentExtractor task did NOT happen. I didn't check if it was remuxing this time though (if that matters).

https://pastebin.com/Uu9JXGUd


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - TheDreadPirate - 2024-11-07

That second file doesn't have attachments to dump.

Let's try rebuilding the container to make sure something isn't broken in the container.

Code:
docker compose down -d jellyfin
docker system prune -a
docker compose up -d jellyfin



RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-10

Running on a brand new container I was able to cause the server slowness after the AttachmentExtractor again.

https://pastebin.com/kLCe2BWJ

Are the ffmpeg logs of any value? https://pastebin.com/7iDn31yJ


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - TheDreadPirate - 2024-11-10

Can you describe the storage for this VM? Is it a virtual disk or something? And what is the storage arrangement for your media? Is it a network share? Cloud storage that is mounted with rclone?


RE: Server becomes unresponsive after a while during ffmpeg AttachmentExtractor task - magguzu - 2024-11-11

No problem, so the storage is an NVME SSD on a Proxmox machine with 100GB partitioned to an Ubuntu VM. Then on the Ubuntu VM the /config, /cache, and that one config file seen in the compose are mounted to the Docker container.

Media is an NFS share from a TrueNAS RAIDZ1 pool.

Just to be clear I've only seen this actually happen when watching One Piece, and it could be because of the ASS subtitles. When it happens it's usually about halfway through a video and the server becomes almost unusable (blue loading circle on the home screen, while media super slowly appears) almost seems like a database read issue, if I had to guess.