From 0441dd7b7ed2841a4b9c904122f2a3a3c3516a4a Mon Sep 17 00:00:00 2001 From: patchy8736 <55986823+patchy8736@users.noreply.github.com> Date: Wed, 7 Jan 2026 14:10:17 +0100 Subject: [PATCH 1/2] Bug Fix: Add socket-timeout to uWSGI production config to prevent VOD stream timeouts during client buffering The production uWSGI configuration (docker/uwsgi.ini) was missing the socket-timeout directive, causing it to default to 4 seconds. When clients (e.g., VLC) buffer VOD streams and temporarily stop reading from the HTTP socket, uWSGI's write operations timeout after 4 seconds, triggering premature stream cleanup and causing VOD streams to disappear from the stats page. The fix adds socket-timeout = 600 to match the existing http-timeout = 600 value, giving uWSGI sufficient time to wait for clients to resume reading from buffered sockets. This prevents: - uwsgi_response_write_body_do() TIMEOUT !!! errors in logs - GeneratorExit exceptions and premature stream cleanup - VOD streams vanishing from the stats page when clients buffer The debug config already had socket-timeout = 3600, which is why the issue wasn't observed in debug mode. This fix aligns production behavior with the debug config while maintaining the production-appropriate 10-minute timeout duration. --- docker/uwsgi.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/uwsgi.ini b/docker/uwsgi.ini index d831adfc..920bac48 100644 --- a/docker/uwsgi.ini +++ b/docker/uwsgi.ini @@ -37,6 +37,7 @@ http-keepalive = 1 buffer-size = 65536 # Increase buffer for large payloads post-buffering = 4096 # Reduce buffering for real-time streaming http-timeout = 600 # Prevent disconnects from long streams +socket-timeout = 600 # Prevent write timeouts when client buffers lazy-apps = true # Improve memory efficiency # Async mode (use gevent for high concurrency) @@ -58,4 +59,4 @@ logformat-strftime = true log-date = %%Y-%%m-%%d %%H:%%M:%%S,000 # Use formatted time with environment variable for log level log-format = %(ftime) $(DISPATCHARR_LOG_LEVEL) uwsgi.requests Worker ID: %(wid) %(method) %(status) %(uri) %(msecs)ms -log-buffering = 1024 # Add buffer size limit for logging \ No newline at end of file +log-buffering = 1024 # Add buffer size limit for logging From fa6315de3387a010c031ff31b76c46b35a2f85f2 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Thu, 8 Jan 2026 13:35:38 -0600 Subject: [PATCH 2/2] changelog: Fix VOD streams disappearing from stats page during playback by updating uWSGI config to prevent premature cleanup --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a830604..01f9bcb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed VOD streams disappearing from stats page during playback by adding `socket-timeout = 600` to production uWSGI config. The missing directive caused uWSGI to use its default 4-second timeout, triggering premature cleanup when clients buffered content. Now matches the existing `http-timeout = 600` value and prevents timeout errors during normal client buffering - Thanks [@patchy8736](https://github.com/patchy8736) - Fixed Channels table EPG column showing "Not Assigned" on initial load for users with large EPG datasets. Added `tvgsLoaded` flag to EPG store to track when EPG data has finished loading, ensuring the table waits for EPG data before displaying. EPG cells now show animated skeleton placeholders while loading instead of incorrectly showing "Not Assigned". (Fixes #810) - Fixed VOD profile connection count not being decremented when stream connection fails (timeout, 404, etc.), preventing profiles from reaching capacity limits and rejecting valid stream requests - Fixed React warning in Channel form by removing invalid `removeTrailingZeros` prop from NumberInput component