Skip to content

Fix media broker connections, empty embed publishing and compiler warnings - #3

Merged
davidvanleeuwen merged 3 commits into
mainfrom
fix/media-broker-connection-budget
Oct 12, 2026
Merged

davidvanleeuwen merged 3 commits into
mainfrom
fix/media-broker-connection-budget

Conversation

@davidvanleeuwen

@davidvanleeuwen davidvanleeuwen commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Long media commands could exhaust the broker's lifetime budget of 4,096 connections and fail subsequent FFmpeg requests with connection refused. The broker now limits concurrent connections instead, releases slots when sockets close, and keeps the control channel available when the limit is reached. Cancellation still closes active connections.

Empty embeds could also remain in publishing when switching from private to public because origin verification required a manifest that does not exist yet. A missing manifest is now accepted in either direction only when the asset has no current video, after policy synchronization and cache purging succeed. Existing videos and storage authorization failures still fail verification.

The broker and playback fixes are separate commits. A third commit removes unreachable private branches identified by Elixir 1.20, preserves explicit file-write error handling, and corrects AIFF/AIFC signature matching to read a four-byte form type, covered by a regression test.

Validation:

  • Broker unit tests, go vet, and three race-detector runs passed.
  • Native sandbox and codec integration checks passed.
  • A synthetic long fragmented-MP4 reproduction failed at 4,096 connections before the fix and completed with 8,796 connections afterward.
  • 18 playback tests passed, including the empty public/private/public transition and failure cases; Credo passed.
  • Formatting and git diff --check passed.
  • Precommit and Credo pass with Elixir 1.20.4. The local Core suite passed 1,188 tests, with five integration tests excluded and one failure: an existing streamed-ZIP fixture contains an invalid DOS date (1980-00-00), rejected by the local OTP 29 ZIP library. This failure reproduces using the fixture directly with Erlang, without application code. CI tests the pinned release runtime (Elixir 1.19.4 / OTP 28.2).

The broker change requires rebuilding the CPU encoding booster image; the playback change requires rebuilding the application. No database migration is needed.

@davidvanleeuwen davidvanleeuwen changed the title Fix media broker connection exhaustion and empty embed publishing Fix media broker connections, empty embed publishing and compiler warnings Oct 12, 2026
@davidvanleeuwen
davidvanleeuwen merged commit f5521a7 into main Oct 12, 2026
3 checks passed
@davidvanleeuwen
davidvanleeuwen deleted the fix/media-broker-connection-budget branch October 12, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant