Closed Bug 1148724 Opened 6 years ago Closed 6 years ago

scheduler retries too aggressively on error

Categories

(Firefox Graveyard :: Reading List, defect)

defect
Not set
normal

Tracking

(firefox38 fixed, firefox39 fixed)

RESOLVED FIXED
Tracking Status
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: markh, Assigned: markh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently the scheduler will retry a sync every 2 minutes until it sees success. This is too aggressive - if the server is overloaded or down this will cause every running profile to attack it :)  If the error is on the client side the user may notice increased network traffic and a performance hit. Later we should differentiate different types of error but until then we should be sensible.

This patch doubles the timeout on error with a max of the "normal" schedule - ie, first error will cause a 2 minute retry, then 4, 8, 16, 32 up to 7200 (default 2 hour schedule). Sequence restarts on next successful sync.  Note also we try and sync after any local RL item change regardless of the current schedule.

This is a fairly simple patch with tests. I think we should take it on 38 - in a worst-case scenario we could effectively DDOS our own service!
Attachment #8584995 - Flags: review?(adw)
Flags: qe-verify-
Flags: in-testsuite+
Flags: firefox-backlog+
(In reply to Mark Hammond [:markh] from comment #0)
> This patch doubles the timeout on error with a max of the "normal" schedule
> - ie, first error will cause a 2 minute retry, then 4, 8, 16, 32 up to 7200
> (default 2 hour schedule).

Doh - mixed up my units - 7200 is seconds - max is 2 hours, 120 minutes.
Attachment #8584995 - Flags: review?(adw) → review+
Iteration: --- → 39.3 - 30 Mar
Blocks: 1132074
Landed on central as https://hg.mozilla.org/mozilla-central/rev/b34ca540cf73
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.