Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default timeout network requests #1578

Closed
shineyjames123 opened this issue Sep 11, 2018 · 5 comments · Fixed by #3024
Closed

Change default timeout network requests #1578

shineyjames123 opened this issue Sep 11, 2018 · 5 comments · Fixed by #3024
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@shineyjames123
Copy link

shineyjames123 commented Sep 11, 2018

Have you read the FAQ and checked for duplicate open issues?:
screen shot 2018-09-11 at 12 08 00 pm

What version of Shaka Player are you using?:
2.5.0-beta
Can you reproduce the issue with our latest release version?:
Yes

Can you reproduce the issue with the latest code from master?:
Yes

Are you using the demo app or your own custom app?:
custom app

If custom app, can you reproduce the issue using our demo app?:
Not tried

What browser and OS are you using?:
Chrome browser in Android

What are the manifest and license server URIs?:

What did you do?
Initiate media playback of Widevine DRM content

What did you expect to happen?
Playback should continue

What actually happened?
Playback stalled after 20 minutes into playback.

Shaka player configuration:

                streaming: {
                    bufferingGoal: 180,
                    rebufferingGoal: 12,
                    failureCallback: function(error) {
                        if (this.shaka.isLive()) this.shaka.retryStreaming();
                        if (this.paused) this.play();
                    },
                    retryParameters: {
                        timeout: 0, // timeout in ms, after which we abort; 0 means never
                        maxAttempts: 128, // the maximum number of requests before we fail
                        baseDelay: 1000, // the base delay in ms between retries
                        backoffFactor: 4, // the multiplicative backoff factor between retries
                        fuzzFactor: 0.5, // the fuzz factor to apply to each retry delay
                    }
                }
            });
@joeyparrish
Copy link
Member

Hi @shineyjames123! It looks like you skipped a question in the form:

What are the manifest and license server URIs?:
NOTE:
You can send the URIs to shaka-player-issues@google.com instead,
but please use GitHub and the template for the rest.
A copy of the manifest text or an attached manifest will not be
enough to reproduce your issue, and we will ask you to send a
URI instead. You can copy the URI of the demo app to send us the
exact asset, licence server, and settings you have selected there.

Without this information, we can't reproduce or fix your issue. Thanks!

@joeyparrish
Copy link
Member

joeyparrish commented Sep 11, 2018

Actually, I think I may see the issue in your configuration:

    timeout: 0, // timeout in ms, after which we abort; 0 means never

With a timeout of 0, a pending request will never be aborted and retried. Try changing this value.

@joeyparrish joeyparrish added the type: question A question from the community label Sep 11, 2018
@shineyjames123
Copy link
Author

Thank you. Setting a timeout of 10000ms did help the player to recover from the "pending" state.

@joeyparrish joeyparrish added type: enhancement New feature or request and removed type: question A question from the community labels Sep 12, 2018
@joeyparrish
Copy link
Member

I'm happy to help.

It occurs to me that we should probably set a default of something other than 0. Since I have never seen a segment size greater than 10s, we should probably default the timeout parameter to 30s. That is loose enough to allow people on very slow connections (1/3 the necessary bandwidth) to pause and buffer content that they can't play otherwise.

Even better would be stall detection. I'll file a separate issue about that.

@joeyparrish joeyparrish reopened this Sep 12, 2018
@joeyparrish joeyparrish changed the title shaka player in buffering state with pending failure Change default timeout network requests Sep 12, 2018
@joeyparrish joeyparrish added this to the v2.5 milestone Sep 12, 2018
@joeyparrish joeyparrish added the flag: good first issue This might be a relatively easy issue; good for new contributors label Sep 12, 2018
@joeyparrish
Copy link
Member

Changing the default timeout is easy, but we will need to call this out in upgrade docs and release notes for v2.5, so that nobody is surprised by the new behavior and everyone can configure the timeout back to 0 if they wish.

Proper stall detection has been filed as #1582.

@joeyparrish joeyparrish added the flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this label May 7, 2019
@joeyparrish joeyparrish modified the milestones: v2.5, Backlog May 7, 2019
@joeyparrish joeyparrish modified the milestones: Backlog, Backlog 2 Jan 28, 2020
joeyparrish pushed a commit that referenced this issue Dec 17, 2020
The old default was 0 (effectively infinite, no timeout).  The new default is 30s.

Closes: #1578
@joeyparrish joeyparrish modified the milestones: Backlog, v3.1 Dec 23, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Feb 15, 2021
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants