Skip to content

1.26.1931038

Latest

Choose a tag to compare

@PiratesIRC PiratesIRC released this 12 Jul 11:00

Two releases worth of work land together here: the auto-match on M3U refresh feature (built earlier but never published) and a fix for a web UI hang that could follow a Match & Assign run.

Fixed

Dispatcharr web UI hangs with a 504 after running Match & Assign.

Symptoms: shortly after a Match and Assign run (including a dry run), the Dispatcharr web UI stops responding. The login page still loads, but logging in never completes, and nginx returns "504 Gateway Time-out". Only a container restart recovers it. Live streams keep playing normally the whole time, which makes it look like Dispatcharr is fine when the API is not.

Cause: Stream-Mapparr could decide a matching job was small enough to run inline inside the HTTP request. Dispatcharr runs uWSGI with gevent, so the matcher's CPU-bound loop never yields to the event loop, and running it in a request freezes the entire worker process, not just that one request. Every other request handled by that worker, including your login, is stuck behind it.

The size estimate that made the decision was wrong in two ways. It assumed 0.8 seconds per channel group, which measured about 3.4x too optimistic in the field (a 29 group job estimated at 23 seconds actually took 1 minute 18 seconds). And it sized the job from the previous run's cached channel set, so changing the selected group or category was invisible to it. That is why the hang tended to show up right after switching category.

Matching jobs now run in the background unless they are genuinely trivial, so they can no longer block the web UI. If the job size cannot be determined at all, it runs in the background too, rather than being run inline on a guess.

Note: a background run still keeps one worker busy for its duration. Moving matching off the uWSGI event loop entirely is planned as follow-up work.

Added (previously unreleased, from 1.26.1861801)

Auto-match after M3U refresh (opt-in). A new "Auto-match after M3U refresh" setting. When enabled, Stream-Mapparr runs Match and Assign automatically as soon as a Dispatcharr M3U refresh finishes, so newly added streams get assigned without waiting for the daily schedule. Requires a Profile to be selected, and requires Dispatcharr v0.27 or newer (the setting is simply inert on older versions). Refresh events for multiple M3U accounts are coalesced, so a "refresh all" does not kick off one match per account.

Housekeeping

All text files in the repository are now normalized to LF. Previous release zips shipped 13 files with Windows CRLF line endings. This was harmless on Dispatcharr's Linux host, but it is now corrected at the source.

Install

Update from the Dispatcharr Plugin Hub, or download Stream-Mapparr.zip below and install it manually.