Open Bug 1280963 Opened 7 years ago Updated 6 months ago

load extremely delayed after waking from sleep with many push notifications

Categories

(Core :: DOM: Push Notifications, defect, P3)

defect

Tracking

()

People

(Reporter: bkelly, Unassigned)

References

(Depends on 1 open bug)

Details

I just experienced the following:

1) Wake laptop (mac) from sleep
2) Try to refresh my twitter tab
3) Twitter tab starts spinning
4) Maybe 30 seconds later I get a notification with "24 twitter notifications"
5) Twitter tab finally loads

It certainly looks like the browser got swamped with pushes from twitter and was blocking the FetchEvent for my refresh from being handled.

Do we do any kind of throttling for the case where a device wakes after a long time and tries to process large numbers of push events in a short time?
Do you know, Kit? (And yes, I know you're on PTO this week and don't expect an answer until you're back)
Flags: needinfo?(kcambridge)
Ouch. We don't currently throttle, but I agree we should. (The server throttles new messages until the device acks outstanding ones, but not when the device reconnects after being offline for a while).

I'll bring this up in today's push standup. Keeping ni? until then.
Flags: needinfo?(kcambridge)
We talked about this today. The server will deliver up to 10 messages before requiring the device to ack outstanding ones. However, we currently ack after decryption, instead of waiting for the worker to finish handling the `push` event. Bug 1280639 tracks that work.

Also, I was wrong:

(In reply to Kit Cambridge [:kitcambridge] (Unavailable from 2016-07-18 to 2016-08-02) from comment #2)
> (The server throttles new messages until the device acks outstanding ones, but not when
> the device reconnects after being offline for a while).

It'll still only deliver 10 at a time, even after reconnecting.
Depends on: 1280639
Priority: -- → P2
I got this again today with only 12 notifications from twitter.  I tried entering the js debugger but was unable to pause the js in the service worker.
A theory:  For some reason an existing service worker thread is getting stuck.  Eventually we trigger the grace timer which kills it.  The next service worker thread then starts handling events again.
I asked you about this off-bug but forget what you said, Ben (sorry). What should we do here?
Flags: needinfo?(bkelly)
It needs someone to reproduce and debug it.  It may or may not reproduce depending on how twitter has changed their SW script.
Flags: needinfo?(bkelly)
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.