Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@

#### Orchestrator
- \#2639 Increase IdleTimeout for HTTP connections (@leszko)
- \#2685 Add a log message when sessions are closed by the Broadcaster. Increase transcode loop timeout (@mj1)

#### Transcoder
8 changes: 6 additions & 2 deletions core/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ import (

const maxSegmentChannels = 4

var transcodeLoopTimeout = 1 * time.Minute
// this is set to be higher than httpPushTimeout in server/mediaserver.go so that B has a chance to end the session
// based on httpPushTimeout before transcodeLoopTimeout is reached
var transcodeLoopTimeout = 70 * time.Second
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea here that we were timing out at the same time as the broadcaster does and so timed out before we had a chance for the B to end the session?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's it yep

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment that this timeout is set to be greater than B timeout? I'm not sure if we want to have it as tight as possible, +10 sec probably should work fine.


// Gives us more control of "timeout" / cancellation behavior during testing
var transcodeLoopContext = func() (context.Context, context.CancelFunc) {
Expand Down Expand Up @@ -991,7 +993,9 @@ func (rtm *RemoteTranscoderManager) selectTranscoder(sessionId string, caps *Cap

// ends transcoding session and releases resources
func (node *LivepeerNode) EndTranscodingSession(sessionId string) {
node.endTranscodingSession(sessionId, context.TODO())
logCtx := context.TODO()
clog.V(common.DEBUG).Infof(logCtx, "Transcoding session ended by the Broadcaster for sessionID=%v", sessionId)
node.endTranscodingSession(sessionId, logCtx)
}

func (node *RemoteTranscoderManager) EndTranscodingSession(sessionId string) {
Expand Down