Commit graph

27 commits

Author SHA1 Message Date
patchy8736
0441dd7b7e 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.
2026-01-07 14:10:17 +01:00
SergeantPanda
f1320c9a5d Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into pr/stlalpha/488 2025-12-02 13:39:06 -06:00
Jim McBride
3eaa76174e Feature: Automated configuration backups with scheduling
- Create/Download/Upload/Restore database backups (PostgreSQL and SQLite)
- Configurable data directory backups (via settings.py)
- Scheduled backups (daily/weekly) via Celery Beat
- Retention policy (keep last N backups)
- Token-based auth for async task polling
- X-Accel-Redirect support for nginx file serving
- Comprehensive tests
2025-11-26 21:11:13 -06:00
SergeantPanda
119b222428 Enhancement: Allow setting both Celery and UWSGI nice levels. Default nice levels are UWSGI=0, Celery=5. Added documentation to the compose files on how to use it. Using nice levels for UWSGI allows us to have streaming run at a high priority. 2025-10-21 10:11:53 -05:00
SergeantPanda
134093b18e Enhancement: Add 'nice -n 5' to celery commands in configuration files for better process priority management 2025-09-27 15:32:29 -05:00
SergeantPanda
6ce387b0b0 Auto-scales Celery based on demand. Should lower overall memory and CPU usage while allowing for high cpu demand tasks to complete quickly.
Closes #111
2025-06-02 18:03:32 -05:00
SergeantPanda
303123f3ec Buffer overflow error. 2025-05-21 09:44:09 -05:00
SergeantPanda
44a79d2a8a Log UWSGI if debug is set (DISPATCHARR_DEBUG=true) 2025-05-14 18:49:46 -05:00
SergeantPanda
24fba3c2b1 Change some celery tasks from info to debug. 2025-05-10 09:58:57 -05:00
SergeantPanda
58773c015c Modify logging levels of uwsgi and fix epg tasks not being deleted when epg is deleted. 2025-05-08 19:47:05 -05:00
SergeantPanda
90c1c3d2ed uwsgi config tuning. 2025-05-01 13:10:49 -05:00
SergeantPanda
e8ee59cf00 Not sure why it didn't push. 2025-05-01 09:31:26 -05:00
SergeantPanda
c11ce048c7 Disable monkey patching. 2025-05-01 09:24:16 -05:00
SergeantPanda
b811a3d45b More sleep events. 2025-05-01 09:05:51 -05:00
SergeantPanda
164f0cdbb5 Increase thread stack size in uwsgi configuration for improved performance 2025-04-27 19:15:00 -05:00
SergeantPanda
90cc65eb7d Increase workers and threads for uwsgi. 2025-04-14 18:11:20 -05:00
dekzter
663ea2c5b9 soooo many changes.... 2025-04-11 13:22:08 -04:00
dekzter
4ede62d886 limit celery workers - need to make this configurable 2025-04-02 16:28:19 -04:00
SergeantPanda
efaa7f7195 Singular redis-client. 2025-03-21 10:55:13 -05:00
dekzter
7a7cd0711d live stats dashboard 2025-03-17 12:42:58 -04:00
dekzter
84e73b9415 dev mode of uwsgi 2025-03-05 19:00:13 -05:00
dekzter
fe8426df2e don't want 777, but for testing 2025-03-05 15:54:35 -05:00
dekzter
1c34fdba03 moved managelpy into entrypoint, hopefully fixed perms with socket 2025-03-05 15:24:29 -05:00
dekzter
80fbb66dbd removed dev for now 2025-03-05 14:53:00 -05:00
dekzter
31b1f1fe36 use exec-before so these aren't executed once per worker, added daphne for websockets 2025-03-05 14:15:25 -05:00
dekzter
59f8ec033c init npm / node on dev environment setup, run npm server (need to make this configurable), more init items for dispatcharr 2025-03-05 08:33:12 -05:00
dekzter
6b0becce62 first attempt to switch to uwsgi 2025-03-04 20:02:40 -05:00