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

How long can the service worker stay awake during an active fetch #1182

Open
jakearchibald opened this issue Aug 9, 2017 · 3 comments
Open

Comments

@jakearchibald
Copy link
Contributor

This issue was WONTFIX'd https://bugs.chromium.org/p/chromium/issues/detail?id=753646 because "Chrome stops the service worker after 5+ minutes timeout even if it is streaming."

This means it's impossible to use service worker to serve a stream of a 2hr movie.

I feels like we should enable this somehow. Eg fetchEvent.waitUntil should be able to keep the service worker alive for as long as the fetch is in-progress.

@wanderview
Copy link
Member

Firefox also stops after a particular timeout (~5 minutes) regardless of extension promises even if no new functional events have been received.

I agree, though, long term streaming needs some kind of solution that does not result in abuse. I guess if closing the window that initiated the FetchEvent aborts the stream then maybe it would all just work.

@delapuente
Copy link

delapuente commented Aug 13, 2017

In addition to @wanderview proposal, I would add some mechanism for the service worker provide a ceiling time estimation so the browser could notify the user properly.

Perhaps not showing the estimation but telling the user: "There are in-progress downloads, do you want to keep them in the background?" and re-prompt after that time expires: "The downloads are taking too much time, do you want to abort them?"

@93910676wangd
Copy link

Can you extend this 5-minute limit time?

It's already 2023, and I hope to extend this fixed time

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

No branches or pull requests

4 participants