New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 646783 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

SW push event should have shorter time limit

Project Member Reported by joh...@chromium.org, Sep 14 2016

Issue description

Currently the "push" event delivered to Service Workers has a 5 minute time limit (it will also be killed if it spends longer than 30 seconds without returning to the event loop). These time limits are controlled by:

const int ServiceWorkerVersion::kTimeoutTimerDelaySeconds = 30;
const int ServiceWorkerVersion::kRequestTimeoutMinutes = 5;

Based on UMA (go/laswz), 99% of requests take <= 30 seconds, 99.9% take <= 1 minutes, 99.98% take <= 2 minutes.

So it seems we can safely shorten the time limit for push events (and it would be best to do this soon, before websites get too used to the 5 minute time limit).
 

Comment 1 by falken@chromium.org, Sep 14 2016

Cc: jkarlin@chromium.org mek@chromium.org
FYI we now have an API to do this (thanks to +jkarlin and +mek's work!)

See ServiceWorkerVersion::StartRequestWithCustomTimeout.

Comment 2 by peter@chromium.org, Sep 22 2016

 Issue 649351  has been merged into this issue.
Owner: harkness@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0046294f2f1c6a3b72dd6d373a8530e1a7a296ec

commit 0046294f2f1c6a3b72dd6d373a8530e1a7a296ec
Author: harkness <harkness@chromium.org>
Date: Tue Nov 29 15:26:23 2016

Add a timeout to push message processing.

Currently, the only time limitation on push message processing is the
service worker default timeout of 5 minutes. 99% of push messages are
processed in under 1 minute, so we want to reduce the timeout so that
outliers don't begin to rely on the long processing available.

BUG= 646783 

Review-Url: https://codereview.chromium.org/2506393003
Cr-Commit-Position: refs/heads/master@{#434995}

[modify] https://crrev.com/0046294f2f1c6a3b72dd6d373a8530e1a7a296ec/chrome/browser/push_messaging/push_messaging_service_impl.cc
[modify] https://crrev.com/0046294f2f1c6a3b72dd6d373a8530e1a7a296ec/content/browser/push_messaging/push_messaging_router.cc
[modify] https://crrev.com/0046294f2f1c6a3b72dd6d373a8530e1a7a296ec/content/public/common/push_messaging_status.h
[modify] https://crrev.com/0046294f2f1c6a3b72dd6d373a8530e1a7a296ec/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)

Sign in to add a comment