Jump to content

Feature Request: Configurable Tuner Handshake Retries


Recommended Posts

PowerCC
Posted

I’ve identified a persistent race condition in the tuner handshake process. In environments where tuners require a specific negotiation window, Emby’s current aggressive, automated retry logic creates contention, often resulting in avoidable handshake failures.

I am proposing that the tuner retry logic be made configurable—specifically, allowing users to toggle these retries on/off or adjust the interval.

This change would significantly improve stability for those of us using specific hardware or custom proxy setups without impacting the default behavior for the rest of the community.

Is this something the development team would consider implementing? I have logs available to demonstrate the handshake conflict if needed.

  • Like 1
  • 1 month later...
Posted
Quote

I have logs available to demonstrate the handshake conflict if needed.

Hi, yes that would be helpful. Thanks.

Posted (edited)

Hi Luke,

Thanks for taking a look. Here are the logs capturing the behavior.

In this example, when a recording attempt fails due to an upstream proxy/tuner returning a 503 Service Unavailable, Emby immediately enters a hardcoded 60-second retry loop, which can cause resource contention with external gateways:

2026-07-26 13:20:03.812 Info LiveTV: Opening live stream for recording from channel [Redacted Channel] to [Redacted GUID] [Redacted Path]/[Redacted Program].ts
2026-07-26 13:20:03.812 Info LiveTvManager: Opening channel stream, external channel Id: [Redacted ID]
2026-07-26 13:20:03.822 Info HttpClient: Http response 503 from http://[Redacted IP]:5004/x_path1_x/x_path7_x after 9ms. Headers Server=BaseHTTP/0.6 Python/3.14.2, Date=Sun, 26 Jul 2026 20:20:03 GMT
2026-07-26 13:20:03.824 Error MediaSourceManager: Error opening live stream MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: ServiceUnavailable at Emby.LiveTV.EmbyTV.GetChannelStreamWithDirectStreamProvider(...) at Emby.Server.Implementations.Library.MediaSourceManager.OpenLiveStreamInternal2(...)
2026-07-26 13:20:03.830 Error LiveTV: Error recording to [Redacted GUID] [...]
2026-07-26 13:20:03.830 Info LiveTV: Retrying recording in 60 seconds.
2026-07-26 13:20:03.861 Info LiveTV: Creating recording timer for [Redacted GUID], [Redacted Program]

As you can see, it forces the subsequent retry precisely 60 seconds later. Having a toggle or adjustable backoff for these tuner failure retries would prevent these aggressive handshake loops from locking up custom proxy setups. Let me know if you need any further details!

Edited by PowerCC
The logs inadvertently revealed sensitive information that should have been redacted.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...