tgemby 1 Posted October 16 Posted October 16 (edited) (please forgive me using claude to help summarize/synthesize the problem I'm seeing and the troubleshooting efforts I've tried so far) Emby Server (Synology DSM) repeatedly misreports "available disk space" during transcoding, triggering false "due to disk space" segment deletions and playback freezes Environment Emby Server version: 4.9.5.0 (.NET 8.0.25), x64, installed via Synology Package Center Platform: Synology DSM, NAS model "DS923+," 4 CPU cores, x64 Data volume: /volume1, btrfs on /dev/mapper/cryptvol_1 (encrypted), 32TB total, currently ~24TB used / ~8.0TB free Transcoding temp path (current): /volume1/[redacted]/transcoding-temp (a real directory on the data volume, owned emby:emby, 755), configured explicitly via Dashboard → Transcoding → Advanced → "Transcoding temporary path" Transcoding temp path (original default, before any changes): /var/packages/EmbyServer/var/transcoding-temp Note: the incidents below are only the handful of times I had logs open and actively dug into this. The actual freezing happens far more often — close to daily — and has been ongoing throughout this whole period. This is not a complete incident list, and the gaps between incidents below do NOT mean the problem went away in between — just that those were the times I captured and analyzed logs in detail. The problem During HLS transcoding, EncodingManager periodically logs: EncodingManager: Deleting segment ... due to disk space. Available space: 829423616 and proactively deletes .ts segment files that are still being read by the client, freezing or stalling playback. The "Available space" figure has consistently been ~829–831 million bytes (~791–792MB), across a month of logs and two different real transcoding-temp paths, while the actual volume has had multiple terabytes free the entire time. It doesn't track real usage and doesn't change when the configured path is relocated. Troubleshooting so far Incident 1: Repeated "due to disk space" deletions on the default path, Available space ~791MB, while df -h on that same path showed 7.6TB free. Also saw a separate ffmpeg crash: Could not write header for output file #N ... No such file or directory → Conversion failed! (HTTP 500 to client) — possibly segments being deleted mid-write. Ruled out disk hibernation/ATA reset via /var/log/messages, dmesg, /proc/uptime. Fix tried: moved transcoding-temp to a new real directory on /volume1, set it explicitly in Transcoding settings, restarted Emby. This did not resolve the underlying problem — the freezing has continued at roughly the same frequency since, as shown below and in day-to-day use that wasn't separately logged. Incident 2: Different symptom — repeated stalls on one episode near the same timestamp, Apple TV client falling back from Direct Play to HLS. No "due to disk space" lines in this particular captured log. ffprobe showed no source file corruption. Possibly an Apple TV/network issue layered on top of the same underlying freezing problem, not necessarily unrelated. Incident 3: The Incident 1 ffmpeg ENOENT crash recurred (mostly on the subtitle-extraction output stream). Fix tried: disabled "Allow subtitle extraction on the fly," restarted Emby. A follow-up log captured a few hours later showed no recurrence of that specific crash, but 99 "due to disk space" deletions in that same window, Available space ~792.4MB, on the same relocated path from the Incident 1 fix, with sustained client disconnects throughout — i.e. the core disk-space problem was still there, just not producing that particular crash signature in this window. Root-cause investigation Three environmental explanations were tested directly and ruled out: Per-user DSM disk quota: the emby Linux account isn't a DSM-managed user — it doesn't appear in Control Panel → User & Group at all, so DSM's User Quota feature can't apply to it. Package sandboxing hiding the real volume: cat /proc/<EmbyServer PID>/mountinfo shows Emby's own process sees /volume1 mounted correctly as real btrfs on /dev/mapper/cryptvol_1, identical to the host's view. btrfs qgroup / shared folder quota: stat -f run directly on the real, live transcoding path returned Total ≈31.4TiB / Available ≈8.0TiB — matching df -h exactly, no quota ceiling at the filesystem level. A coincidence worth flagging: the ~791–792MB figure is close to the free space on DSM's own small system partition (/dev/md0, 2.3GB total). But Emby's process working directory and the live stat -f results above both check out correctly against /volume1, so this doesn't look like the literal mechanism — just a possibly-relevant coincidence for your engineers. Leading theory: since every OS/filesystem-level explanation is ruled out, the "Available space" figure is likely not being queried live against the configured path at log time — more likely a cached, stale, or internally-tracked value that doesn't reflect real-time disk state. The problem has been persistent and near-daily rather than intermittent, so whatever is producing this wrong value appears to be a standing condition rather than something tied to a specific restart. Known precedent Forum thread #116243 describes the same symptom on another Synology/Emby install — a small root volume triggering "due to disk space" deletions despite ample space on the real data volume. Their fix (properly setting the Transcoding temporary path) is the same one I tried, and also wasn't durable. No staff explanation of the mechanism was given there either. Questions Is "Available space" queried live via DriveInfo/statvfs() on the configured path each time, or cached/derived once? Any known issue with this check specific to Synology package installs? Any way to force a re-check without a full restart, to help isolate a startup-caching bug? Any way to disable or raise the threshold for this proactive deletion behavior — it currently causes far more disruption than running close to actually full would? Happy to provide full logs and the exact mountinfo/stat -f/df -h output on request. Edited October 16 by tgemby edited for clarity!
Luke 43532 Posted October 16 Posted October 16 Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks! 1
tgemby 1 Posted October 16 Author Posted October 16 (edited) 1 hour ago, Luke said: Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks! No problem! Between 08:14 and 09:04 today, the same single episode triggered at least seven separate ffmpeg transcode sessions, each lasting only a few minutes before ending and being replaced by a new one: 08:14:03 → 08:16:52 (EXIT) 08:17:59 → (restarted) 08:47:17 → 08:51:49 (EXIT) 08:52:44 → 08:57:24 (EXIT) 08:58:18 → 09:00:58 (EXIT) 09:01:50 → (restarted) 09:04:20 → (restarted) This sits in the same window as the server log attached below (the one showing 99 "due to disk space" deletions, Available space ~792.4MB). None of these ffmpeg sessions show the ENOENT crash from my earlier incidents — they end cleanly or get superseded — but something is repeatedly forcing a brand-new transcode session for the same episode every few minutes, consistent with the client losing its segments to the false disk-space deletions and having to restart the stream from scratch each time. Attaching all six full ffmpeg logs from this window, sanitized the same way as my original server log attachment. Thanks! embyserver_disk-space-incident_sanitized.txt ffmpeg-transcode_08-17-59_sanitized_1.txt ffmpeg-transcode_08-47-17_sanitized_1.txt ffmpeg-transcode_08-52-44_sanitized_1.txt ffmpeg-transcode_08-14-03_sanitized_1.txt ffmpeg-transcode_08-58-18_sanitized_1.txt ffmpeg-transcode_09-01-50_sanitized_1.txt Edited October 16 by tgemby edited for clarity
Luke 43532 Posted October 16 Posted October 16 Quote Is "Available space" queried live via DriveInfo/statvfs() on the configured path each time, or cached/derived once? Hi, this is using the dotnet runtime DriveInfo api, I'm not sure what that is calling underneath the hood. But it is checking this constantly.
tgemby 1 Posted October 18 Author Posted October 18 On 10/16/2026 at 12:55 PM, Luke said: Hi, this is using the dotnet runtime DriveInfo api, I'm not sure what that is calling underneath the hood. But it is checking this constantly. Thanks, that's a useful data point, and it actually rules something out for me. If it's checking via DriveInfo constantly (i.e. live, not cached), that means it isn't a stale-value problem — it's getting the wrong answer freshly on every single call for this path. That's worth pinning down, because I've already confirmed the OS itself reports the correct value for the exact same path: running stat -f directly against my configured transcoding directory returns Total ≈31.4TiB / Available ≈8.0TiB, matching df -h exactly. So the real filesystem is fine — whatever DriveInfo is doing underneath only goes wrong somewhere between the raw syscall and what Emby sees. One concrete thing worth checking: my data volume is a Synology btrfs volume, and it doesn't mount like an ordinary filesystem. The relevant line from /proc/<EmbyServer PID>/mountinfo is: 41 17 0:32 /@syno /volume1 rw,nodev,relatime - btrfs /dev/mapper/cryptvol_1 rw,ssd,synoacl,space_cache=v2,auto_reclaim_space,metadata_ratio=50,block_group_cache_tree,syno_allocator,subvolid=256,subvol=/@syno Note the two different path fields — /@syno (the subvolume's own internal root) vs /volume1 (the actual mount point). Most mount entries have those identical; this one doesn't, because it's a btrfs subvolume mount. If DriveInfo's Linux implementation resolves a path to a filesystem by walking/matching against the mount table (rather than just calling statvfs() directly on the given path and trusting the kernel to resolve it), a subvolume-style entry like this seems like a plausible place for that matching to go wrong — Synology volumes are commonly mounted this way, which might also explain why this isn't a totally obscure one-off (see the other forum thread I linked with the same symptom). Happy to provide the full mountinfo output, or run any other test that would help narrow down where in the stack this breaks.
Luke 43532 Posted October 26 Posted October 26 OK can you temporarily enable debug logging, then restart the server and repeat the test? Then we'll see how much space the server thinks is available. Thanks.
tgemby 1 Posted October 29 Author Posted October 29 (edited) On 10/25/2026 at 8:37 PM, Luke said: OK can you temporarily enable debug logging, then restart the server and repeat the test? Then we'll see how much space the server thinks is available. Thanks. Ok! Attaching both the debug version of embyserver.log, and the hardware_detection log that was also generated! Are these sufficient, or do I need to wait for the problem to manifest again and send a copy of the log at that point? embyserver_10-29_sanitized.txt hardware_detection_10-29_sanitized.txt Edited October 29 by tgemby fixing typos
Luke 43532 Posted October 29 Posted October 29 2 minutes ago, tgemby said: Ok! Attaching both the debug version of embyserver.log, and the haembyserver_10-29_sanitized.txt rdware_detection log that was also generated! Are these sufficient, or do I need to wait for the problem to manifest again and send a copy of the log at that point? hardware_detection_10-29_sanitized.txt 28.32 kB · 0 downloads Hi, this one is not sufficient. You need to get the issue to occur while debug logging is on. Thanks.
tgemby 1 Posted October 30 Author Posted October 30 8 hours ago, Luke said: Hi, this one is not sufficient. You need to get the issue to occur while debug logging is on. Thanks. Fair enough. Watched some more stuff this evening, and had various problems. Attaching the full debug log below! embyserver1_10-29_full-session_sanitized.txt
Luke 43532 Posted October 30 Posted October 30 Thanks. There is a possible fix for this on the beta channel in the event that you need immediate relief.
tgemby 1 Posted October 30 Author Posted October 30 10 hours ago, Luke said: Thanks. There is a possible fix for this on the beta channel in the event that you need immediate relief. Interesting... I'm willing to give it a shot! Are you by any chance able to point me towards documentation on how to get that installed on my Synology? I took a look around, and I'm not finding it for some reason.
tgemby 1 Posted October 30 Author Posted October 30 (edited) Oop! Found the beta release! I'll try installing 4.11.0.12-724110012 now, and see what happens! Edited October 30 by tgemby version #
Luke 43532 Posted October 30 Posted October 30 OK I just want to say that in all honesty, unless you consider this a major blocking issue, then having you move to the beta benefits us more than it does you. I wouldn't switch to beta unless the issue is really hampering you.
tgemby 1 Posted October 30 Author Posted October 30 14 minutes ago, Luke said: OK I just want to say that in all honesty, unless you consider this a major blocking issue, then having you move to the beta benefits us more than it does you. I wouldn't switch to beta unless the issue is really hampering you. The issue I'm seeing is pretty bad. It's intermittent, but when it DOES happen, playback will just freeze every few minutes, and I need to quit out of the show, and resume again in order to get it to restart. At the somewhat-less-annoying end of the spectrum is that video and audio playback will get out of sync, such that video is ahead of audio... and there, also, I need to quit out of the playback, and resume in order to get it back into sync again. Soo.... HOPEFULLY the beta will fix it! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now